[R] LMER: How to specify Random Effects
Ubuntu Diego
ubuntu.diego at gmail.com
Tue Dec 1 17:22:09 CET 2009
I saw different specifications for Random Effects and I'm confused about
the use of "/" and the use of "(0+...|)" .
Let say we have a nested structure where some countries have some
several plants in different states and we measure the reaction to a drug.
The list of Countries = USA, France, Italy
The States for USA = Michigan, Florida, California
The States for France = Paris, Orleans
The States for Italy = Venezia, Sienna, Florence, Rome, Napoli , Sicilia
Plants were classified as High and Low
is this the way to specify a possible model ?
lmer(Reaction ~ Drug + (1| Country / State / Plant) , data)
or should I use something like this
A) lmer(Reaction ~ Drug + (0| Country / State / Plant) , data)
B) lmer(Reaction ~ Drug + (1| Country ) + (0+Country | State / Plant) ,
data)
C) lmer(Reaction ~ Drug + (1| Country ) + (0+Country | State / Plant) +
(0+Country + State | Plant), data)
D) lmer(Reaction ~ Drug + (1| Country ) + (0+Country | State ) +
(0+Country + State | Plant), data)
Thanks
More information about the R-help
mailing list