# Spline function with unknown knots

Does anybody know whether R has a package/routine for estimating spline function with unknown number of knots?

• and spline does not work why? Feb 11 '11 at 13:53
• please clarify. Are you looking for packages that fit so-called free-knot spline models, i.e., regression splines where the number and location of knots must also be determined using the observed data? Feb 11 '11 at 14:06
• Hi - yes, you are perfectly right - I'm looking for an estimator of splines where the number and location of knots must be estimated and using the observed data (time serie data).
– user3154
Feb 11 '11 at 17:43

Have a look at the facilities for fitting smoothing splines in the gam package.