Thanks, Derek.
I used your code, but H still has a lot of columns being 0. I'm not sure
why.
I'm dealing the data http://www-stat.stanford.edu/~tibs/ElemStatLearn/
with X=age, Y=spnbmd
I think X has too many duplicated data???
I'll check the book you recommended in the library tomorrow. Thanks
Thank you. D Sonderegger.
Did you mean use
bs <- bs(X, knots = spl$fit$knot)
H <- predict(bs, X)
Then H should be the matrix for the original data under the smoothing spline
basis?
However, another problem arises, since I need to use H to estimate the
coefficient beta, which involves (H'H)^{-
Anybody knows how to generate the basis matrix for smoothing spline?
And how about the smoother matrix? I tried to use the following code, but
there exist replicated data in X, and the length of smooth.spline(X,
S[,i])$y is smaller than X, and then there is error in the last step.
spl <- smoot
3 matches
Mail list logo