Eddy G.
2005-Jun-14 12:10 UTC
[R] bs() function of the splines package with intercept=FALSE
Hello, I'm implementing a function using non uniform B-Splines. Looking at the code of the bs() function, I realized that if the intercept was set to FALSE, the behavior of the function was the following (df is the number of degrees of freedom that I believe can be interpreted as the number of control points): - Compute df- ord + 1 _internal_ knots (ord is the order of the spline) - Add ord times the boundaries values at each extrem of the knots vector. - Compute the design matrix on this vector. This results in a design matrix with df+1 columns. The bs function the _removes_ the first column of the matrix (resulting as expected in a matrix with df columns). I'm a bit confused, does anyone see the mathematical justification of this manipulation? Thanks a lot, Laurent http://www.imagine-msn.com/hotmail/default.aspx?locale=fr-FR