[R] lme and aov
HDoran at air.org
Fri Aug 3 22:09:29 CEST 2007
I think what Peter is asking for is for you to put some of your output
in an email. If the values of the fixed effects are the same across
models, but the F-tests are different, then there is a whole other
thread we will point you to for an explanation. (I don't presume to
speak for other people, btw, and I'm happy to stand corrected)
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Gang Chen
> Sent: Friday, August 03, 2007 4:01 PM
> To: Peter Dalgaard
> Cc: r-help at stat.math.ethz.ch
> Subject: Re: [R] lme and aov
> Thanks for the response!
> It is indeed a balanced design. The results are different in
> the sense all the F tests for main effects are not the same.
> Do you mean that a random interaction is modeled in the aov
> command? If so, what would be an equivalent command of aov to
> the one with lme?
> On Aug 3, 2007, at 3:52 PM, Peter Dalgaard wrote:
> > Gang Chen wrote:
> >> I have a mixed balanced ANOVA design with a
> between-subject factor
> >> (Grp) and a within-subject factor (Rsp). When I tried the
> >> two commands which I thought are equivalent,
> >> > fit.lme <- lme(Beta ~ Grp*Rsp, random = ~1|Subj, Model); >
> >> fit.aov <- aov(Beta ~ Rsp*Grp+Error(Subj/Rsp)+Grp, Model);
> >> I got totally different results. What did I do wrong?
> > Except for not telling us what your data are and what you mean by
> > "totally different"?
> > One model has a random interaction between Subj and Rsp, the other
> > does not. This may make a difference, unless the
> interaction term is
> > aliased with the residual error.
> > If your data are unbalanced, aov is not guaranteed to give
> > results.
> > -pd
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help