Skip to content
Prev 14516 / 20628 Next

lme with cyclic cubic regression splines

Gabriela Czanner via R-sig-mixed-models <r-sig-mixed-models at ...> writes:
As Alexandre Villers implicitly pointed out, specifying a smooth
term via s() is restricted to the mgcv:gam(m) and gamm4:gamm functions.
However, if you want to do this in lme (with spline order and knot
positions pre-specified, rather than using penalized regression splines)
it looks like you could use cSplineDes from the mgcv package to set
up the splines yourself.  However, I don't know how smoothly these
will work with the built-in model matrix machinery -- using gamm(4)
will probably be easier. 

  Ben Bolker