Skip to content
Prev 296746 / 398498 Next

Do YOU know an equation for splines (ns)?

I agree with Bill and Bert:  "predict" is the proper tool for 
making predictions.  Pinheiro and Bates (2000) Mixed-Effects Models in S 
and S-Plus (Springer) includes several entries in the index for 
"predictions".  Please note, however, that there are a few lines of code 
in that book the work in S-Plus but not R.  Fortunately, the corrections 
are available in script files distributed with the package, which you 
can find as follows:
[1] "c:/Program Files/R/R-2.15.0/library/nlme/scripts"


       The TaylorSpline{fda} function will give you explicit 
coefficients each segment of a spline.  However, if you want model 
predictions, you are probably best using predict with objects produced 
by functions in nlme.  That package has seen lots of use and attention 
by the R Core team, and should be pretty good -- especially with the 
documentation provided by Pinheiro and Bates.


       Hope this helps.
       Spencer
On 6/6/2012 1:48 PM, William Dunlap wrote: