basis and penalty matrices for natural cubic splines

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

basis and penalty matrices for natural cubic splines

Wei Zhang-2
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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html