Skip to content
Prev 1238 / 20628 Next

Simple lme/lmer random effects questions

Hi Brandon,
On Tue, Aug 12, 2008 at 12:03:34AM +0200, Brandon Invergo wrote:
First, let me compliment you on the quality of the description of your
setup.  Nice work!
You should generate unique names for all combinations.
Based on your earlier description, I think that it should be 

model <- lme(response ~ sex*temp, random=~1|temp/sleeve.in.temp, data)

but the following would also work just fine:

model <- lme(response ~ sex*temp, random=~1|temp/sleeve, data)

For the lmer syntax, I think that you should use

model <- lmer(response ~ sex*temp + (1|temp) + (1|sleeve.in.temp), ...

I strongly recommend Pinheiro and Bates as top reading for getting the
analysis right :)

Good luck!

Andrew