Re: [R] lme and lmer syntax

From: John Wilkinson (pipex) <wilks_at_dial.pipex.com>
Date: Wed 26 Oct 2005 - 23:05:57 EST


Ronaldo,

According to Douglas Bates's paper in 'R' News, It would seem that the correct model for nested split plot random effects with lmer , in your example ,with x2 nested within x1, would be --

lmer(y~x1 + x2 +(1|x1)+(1|x1:x2))

Try it with your model any see how it compares with your aov and lme models,

John

m Seg 24 Out 2005 18:08, Doran, Harold escreveu:
> Ronaldo
>
> See the article on lmer pasted below for syntax. It is the only current
> source documenting the code. In lmer(), the nesting structure for the
> ranmdom effects is handled in a slightly different way. If your
> observations are nested as you note, then you can use
>
> > lmer(y~x1 + x2 +(1|x1) + (1|x2), data)
>
> @Article{Rnews:Bates:2005,
> author = {Douglas Bates},
> title = {Fitting Linear Mixed Models in {R}},
> journal = {R News},
> year = 2005,
> volume = 5,
> number = 1,
> pages = {27--30},
> month = {May},
> url = {http://CRAN.R-project.org/doc/Rnews/},
> }
>

Hi,

I try this with a splitsplitplot example.

I make the correct model with aov, lme do compare with lmer.

But I cant make a correct model in lmer. Look that the aov and lme results are
similars, but very different from lmer. In aov and lme is used the correct DF
for each variable, in lmer it use a same DF for all? Denom=54.

What is my mistake?

Thanks
Ronaldo



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Oct 26 23:29:21 2005

This archive was generated by hypermail 2.1.8 : Thu 27 Oct 2005 - 00:39:20 EST