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 again. D Sonderegger wrote: > > Close, but not quite. Your design matrix is: > H <- bs(X, knots=spl$fit$knot, intercept=TRUE) > > So long as you have data in all of the inter-knot regions, you should be > ok. > > A good book to check out about this sort of thing is Ruppert, Wand and > Carroll's Semiparametric Regression book. I can't recommend that book > highly enough. > > Derek > -- View this message in context: http://n4.nabble.com/Smoothing-Spline-Basis-Matrix-tp1573131p1574498.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.