[R-sig-ME] Can we do b-spline within lmer function?

Ken Beath kjbeath at kagi.com
Mon Jan 14 21:29:22 CET 2008


On 15/01/2008, at 2:59 AM, Zhong, Xiao wrote:

> Hello,
>
> I am working on a project that uses glmm. I would like to consider b- 
> spline in the original glmm but I couldn't find how to add b-spline  
> terms to the normal lmer function. Is there anybody who could help  
> me with that?
>

library(splines)
fm2 <- lmer(Reaction ~ bs(Days) + (1|Subject), sleepstudy)

Ken




More information about the R-sig-mixed-models mailing list