[R] lme and lmer syntax
Doran, Harold
HDoran at air.org
Mon Oct 24 22:08:41 CEST 2005
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/},
}
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Ronaldo Reis-Jr.
Sent: Monday, October 24, 2005 3:56 PM
To: R-Help
Subject: [R] lme and lmer syntax
Hi,
I have this:
lme(y~x1+x2,random=~1|x1/x2)
How to make this random effect using lmer?
I try this:
lmer(y~x1+x2+(1|x1/x2)
But it dont work.
Any idea?
Thanks
Ronaldo
--
System halted!
--
|> // | \\ [***********************************]
| ( õ õ ) [Ronaldo Reis Júnior ]
|> V [UFV/DBA-Entomologia ]
| / \ [36570-000 Viçosa - MG ]
|> /(.''`.)\ [Fone: 31-3899-4007 ]
| /(: :' :)\ [chrysopa at insecta.ufv.br ]
|>/ (`. `'` ) \[ICQ#: 5692561 | LinuxUser#: 205366 ]
| ( `- ) [***********************************]
|>> _/ \_Powered by GNU/Debian Woody/Sarge
______________________________________________
R-help at 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
More information about the R-help
mailing list