[R-sig-ME] Can we do b-spline within lmer function?
kjbeath at kagi.com
Thu Jan 17 00:07:56 CET 2008
On 15/01/2008, at 9:42 AM, Zhong, Xiao wrote:
> Thanks, Ken.
> I tried your advice on my model:
> model2.growth.mcas5 <- lmer(response ~ bs(monthElapsed) + skills +
> (1|studentID), data= mcas5, family=binomial(link="logit"), control =
> list(msVerbose = 1, usePQL = FALSE))
> It worked! What it gave me is:
> bs(monthElapsed)2 bs(monthElapsed)3
> -0.1934738 0.6257330
> skillsG-Geometry skillsM-
> Measurement skillsN-Number-Sense-Operations skillsP-Patterns-
> 0.5263370 0.1897903
> Since I am trying to use design matrix to predict after that glmm
> fitting, could you tell me if there is some function/command that I
> can use to find what the three "bs" did to my "monthElapsed" variable?
As Vito mentioned you probably need a few more knots, see the help on
bs. The spline models I have fitted have been in lme and have used
predict to obtain the shape of the curves, but this doesn't seem
available in lmer.
More information about the R-sig-mixed-models