I would like to know if someone has information on the relation between knot position and degree of the regression spline, thus without penalization on the spline coefficients. If the spline can be represented with a 2-knots spline of degree 1 using the truncated power basis expansion, increasing the degree might affect the position and/or the number of knots? It's just a curiosity, I haven't found anything until now in the literature.
-
1$\begingroup$ regression splines have defined knots. Are you referring to using some particular function in some package where you specify df and that function is placing the knots for you? $\endgroup$– Glen_bCommented Sep 20, 2017 at 0:52
-
1$\begingroup$ No, I'm not using any particular function. My curiosity regards the connection between the number of knots and the degree of a spline function when we have a low number of knots (3 or 4). $\endgroup$– Prunus aviumCommented Sep 26, 2017 at 9:18
1 Answer
Regression splines are just fitted by ordinary regression, and you can count the degrees of freedom the same was as with any multiple regression.
With an ordinary cubic regression spline (which is cubic outside the boundary knots), you have 4 d.f. (for the initial cubic) plus 1 d.f. per knot (for $k$ knots that's $k+4$ d.f. total).
With a natural cubic regression spline, the restriction to linearity outside the boundary knots reduces the d.f. by 2 at each end, leaving $k$ d.f. in all.
Spacing between knots doesn't come into the counts at all.