Re: [R] lmm WITHOUT random factor (lme4)

From: Mark Difford <>
Date: Thu, 17 Mar 2011 02:54:43 -0700 (PDT)

On Mar 17, 2011; 11:43am Baugh wrote:

>> Question: can I simply substitute a dummy var (e.g. populated by zeros)
>> for "ID" to run the model
>> without the random factor? when I try this R returns values that seem
>> reasonable, but I want to be sure
>> this is appropriate.

If you can fit the model using lme (and it looks like you easily can) then another check would be:

## Compare models with and without random effects fm <- lm(Reaction ~ Days, sleepstudy)
fm1 <- lme(Reaction ~ Days, random= ~1|Subject, sleepstudy)

anova(fm1, fm)                 ## lme-fitted model must come first

Regards, Mark.

View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 17 Mar 2011 - 14:03:10 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 17 Mar 2011 - 14:40:23 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive