[R] specifying an unbalanced mixed-effects model for anova
Murat Tasan
mmuurr at gmail.com
Wed Jul 28 07:02:58 CEST 2010
to be more clear, i'm particularly interested in trying to determine
the effect of "Class" on "Score1", while controlling for the effect
"Score2" has on "Score1" (and "Score2" is correlated with
"Class" (where "Class" is an ordered variable with exactly 4 distinct
levels)).
i can perform an ANOVA on "Score1" with "Class" alone (as the
treatment) to show that "Class" likely has a strong effect on
"Score1", but i'd like to somehow remove the effect of "Score2" and
then essentially repeat the "Score1" vs "Class" analysis.
pointing me towards any decent literature on this would be a great
help.
On Jul 28, 12:16 am, Bert Gunter <gunter.ber... at gene.com> wrote:
> 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 <mmu... 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-h... at r-project.org mailing list
> >https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> R-h... at r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list