[R] linear model lme4
Doran, Harold
HDoran at air.org
Fri Feb 25 17:07:40 CET 2011
No, as the error states, you need random effects in lmer. But, you don't for lm() and that is what you're running with no random effects. However, some caution is warranted on the comparison.
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
> Behalf Of Brian Smith
> Sent: Friday, February 25, 2011 10:06 AM
> To: r-help at r-project.org
> Subject: [R] linear model lme4
>
> Hi,
>
>
> I wanted to check the difference in results (using lme4) , if I treated a
> particular variable (beadchip) as a random effect vs if I treated it as a
> fixed effect.
>
>
> For the first case, my formula is:
>
>
> lmer.result <- lmer(expression ~ cancerClass + (1|beadchip))
>
>
> For the second case, I want to do:
>
>
> lmer.result2 <- lmer(expression ~ cancerClass + beadchip)
>
>
>
> However, I get an error in the second case:
>
>
> > Error in lmerFactorList(formula, fr, 0L, 0L):
>
> No random effects terms specified in formula
>
>
>
> Is there any way that I can get lmer() to accept a formula without a random
> effect?
>
>
> many thanks
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list