[R-sig-ME] Can we do b-spline within lmer function?
Zhong, Xiao
xiaozh at WPI.EDU
Thu Jan 17 02:27:18 CET 2008
I see. Thanks.
xiao
________________________________________
From: Ken Beath [kjbeath at kagi.com]
Sent: Wednesday, January 16, 2008 6:07 PM
To: Zhong, Xiao
Cc: r-sig-mixed-models at r-project.org
Subject: Re: [R-sig-ME] Can we do b-spline within lmer function?
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:
>
> (Intercept)
> bs(monthElapsed)1
> bs(monthElapsed)2 bs(monthElapsed)3
> -0.1509712
> 0.7019262
> -0.1934738 0.6257330
> skillsG-Geometry skillsM-
> Measurement skillsN-Number-Sense-Operations skillsP-Patterns-
> Relations-Algebra
> -0.4333880
> -0.9468761
> 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.
Ken
More information about the R-sig-mixed-models
mailing list