Skip to content

mixed model MANCOVA

4 messages · Erika Crispo, Adam D. I. Kramer, Hadley Wickham +1 more

2 days later
#
Hi Erika,

 	I have not tried this before, and I hope that somebody will correct
me if I'm wrong, but the glmer function in the lme4 library appears to do
what you want. From examples(lmer):

lmer> (gm1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 |
herd), family = binomial, data = cbpp))

...I guess that this will do what you want it to because it has multiple
variables on the LHS and both continuous and categorical variables on the
RHS, along with an explicit grouping structure.

In your case, you probably want to leave the family= argument out, as noted
in ?glmer, "If 'family' is missing then a linear mixed model is fit;
otherwise a generalized linear mixed model is fit." ...MANCOVA tend to be
generalized linear models.

Once again, though, I have not used this system personally, haven't seen
your data, and don't know what output to expect. Hopefully somebody else can
confirm or deny this solution's efficacy.

--Adam
On Mon, 8 Sep 2008, Erika Crispo wrote:

            
#
On Mon, Sep 8, 2008 at 1:06 PM, Erika Crispo
<erika.crispo at mail.mcgill.ca> wrote:
Why?  What is the purpose of your analysis?  Why do you think a
mixed-effects MANCOVA is appropriate? What have simpler models told
you about the data?  What exploratory graphics have you done?

Hadley
#
Dear Erika et al.,

I'm not sure exactly what you want to do, but you might take a look at the
Anova() function in the car package, which will compute "type-II" or
"type-III" tests for multivariate linear models, including models with
repeated measures; you can also get the traditional univariate tests. Be
very careful of Type-III tests, especially if the covariate is involved in
interactions, since it's very easy to test strange hypotheses (as is true
even in a univariate context). There are some examples of repeated-measures
ANOVAs and MANOVAs in ?Anova.

I hope this helps,
  John

------------------------------
John Fox, Professor
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
web: socserv.mcmaster.ca/jfox
On
sums
individually,
let
http://www.R-project.org/posting-guide.html