[R] basis and penalty matrices for natural cubic splines

Wei Zhang wxz118 at yahoo.com
Fri Dec 16 23:26:27 CET 2005


Hi,
I am trying to get the basis matrix and penalty matrix
for natural cubic splines. I found R function "ns" can
generate the B-spline basis matrix for a natural cubic
spline; and  "bsplinepen"  
can compute the penalty matrix for functions expressed
in terms of a B-spline basis. However, these two
functions seem not compatible. I could not get the
penalty matrix by "bsplinepen" using the basis matrix
generated from "ns".
Anyone knows any compatible functions to give the
basis
matrix and penalty matrix for natural cubic splines? 
Thanks a lot!
Wei




More information about the R-help mailing list