[R] specifying an unbalanced mixed-effects model for anova

Bert Gunter gunter.berton at gene.com
Wed Jul 28 06:16:25 CEST 2010


You are confused. You have not specified a "grouping" random effect,
so  this is not a mixed effect model as it stands.

If this is a homework problem, ask a teacher or classmate for help.
Otherwise, try consulting your local statistician. You do not appear
to understand the concepts of mixed effects models, so just walking
you through a lme model specification is not likely to help.

Bert Gunter





On Tue, Jul 27, 2010 at 8:24 PM, Murat Tasan <mmuurr at gmail.com> wrote:
> hi all - i'm having trouble using lme to specify a mixed effects
> model.
> i'm pretty sure this is quite easy for the experienced anova-er, which
> i unfortunately am not.
>
> i have a data frame with the following columns:
> col 1 : "Score1" (this is a continuous numeric measure between 0 and
> 1)
> col 2 : "Score2" (another continuous numeric measure, this time
> bounded between 0 and 100)
> col 3 : "Class" (a fixed-effects factor with 4 (ordered) levels)
>
> i have ~2000 observations, but unbalanced w.r.t. the "Class" factor.
> each observation has a distinct "Score1" and "Score2".
>
> i'd like to try a mixed-effect anova model where "Score1" is the
> dependent response, and "Score2" and "Class" are the explanatory
> covariates (with an expected interaction between them).
>
> naively, i simply tried:
> aov(Score1 ~ Score2 * Class)
>
> but i'm pretty sure this treated "Score2" as a fixed-effects covariate
> with a single observation per level.
>
> can anyone help guide me to the correct model specification using
> lme(...)?
>
> thanks much for any help!
>
> ______________________________________________
> 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