[R] Repeated measures by lme and aov give different results
Jeff Miller
jeffmiller at alphapoint05.net
Thu Nov 16 22:42:38 CET 2006
Nothing personal against Spencer. However, I feel that the response was
similar to just saying, "Let's not use the listserv anymore". Personally, I
find most, if not all, of the questions to be very helpful. I use them to
learn the language. When something looks over-my-head, I put it in a folder
for future reference. It's nice now to respond to the easy questions...
I would also suggest an end to the "Why don't you read the R guides at
CRAN?" responses...unless accompanied by a response to the actual question.
Pushing people away from posting to the listserv seems to be against both
the purpose of a listserv and open-source ideology.
Jeff
P.S. I'm not sure why aov and lme gave you discrepant findings; however, I'm
not sure why anyone would use aov for this model.
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Spencer Graves
Sent: Thursday, November 16, 2006 4:14 PM
To: Vicki Allison
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] Repeated measures by lme and aov give different results
RSiteSearch("lme and aov") returned 350 hits for me just now. I'm
sure that many are not relevant to your question, but I believe some
are. Beyond this, there is now and R Wiki, accessible via
www.r-project.org -> Documentation: Wiki (or directly as
http://wiki.r-project.org/rwiki/doku.php?id=guides:lmer-tests&s=lme%20and%20
aov).
The first hit in a search there for "lme and aov" "is an edited
transcript of a long thread in R-help starting Sept 7, 2006 from a
comment by Hank Stevens, with Douglas Bates as leading actor."
(http://wiki.r-project.org/rwiki/doku.php?id=guides:lmer-tests&s=lme%20and%2
0aov).
If that fails to answer your questions on this, please submit
another post. Please realize however that the expected number and
quality of replies is inversely proportional to some large power of the
length and complexity of your question.
Hope this helps.
Spencer Graves
Vicki Allison wrote:
> I am analyzing data from an experiment with two factors: Carbon (+/-)
> and O3 (+/-), with 4 replicates of each treatment, and 4 harvests over a
> year. The treatments are assigned in a block design to individual
> Rings.
>
> I have approaches this as a repeated measures design. Fixed factors
> are Carbon, O3 and Harvest, with Ring assigned as a random variable. I
> have performed repeated measures analysis on this data set two different
> ways: one utilizing lme (as described in Crawley, 2002), and the second
> using aov (based on Baron and Li, 2006). Using lme I get very
> conservative p-values, while aov gives me significant p-values,
> consistent with those I obtain performing this analysis in SYSTAT. Can
> anyone explain how these models differ, and which is more appropriate to
> the experimental design I have described? The code I use, and the
> output obtained follow:
>
> 1 lme model
>
> library(nlme)
> M5 <-lme(ln_tot_lgth ~ Carbon*O3*Harv., random = ~-1|Ring)
> anova(M5, type="marginal")
>
> # Output
> numDF denDF F-value p-value
> (Intercept) 1 44 176.59692 <.0001
> Carbon 1 12 0.42187 0.5282
> O3 1 12 0.06507 0.8030
> Harv. 1 44 17.15861 0.0002
> Carbon:O3 1 12 0.23747 0.6348
> Carbon:Harv. 1 44 0.85829 0.3593
> O3:Harv. 1 44 0.04524 0.8325
> Carbon:O3:Harv. 1 44 0.05645 0.8133
>
>> plot(M5)
>>
>
>
> 2 aov model
>
> M6<-aov(ln_tot_lgth ~ O3*Harv.*Carbon + Error (Ring/Carbon+O3))
> summary(M6)
> plot(M6)
>
> # Output
> Error: Ring
> Df Sum Sq Mean Sq F value Pr(>F)
> O3 1 1.76999 1.76999 8.2645 0.01396 *
> Carbon 1 0.64766 0.64766 3.0241 0.10760
> O3:Carbon 1 0.15777 0.15777 0.7366 0.40756
> Residuals 12 2.57002 0.21417
>
> Error: Within
> Df Sum Sq Mean Sq F value Pr(>F)
> Harv. 1 33.541 33.541 84.0109 9.14e-12 ***
> O3:Harv. 1 0.001 0.001 0.0036 0.9524
> Harv.:Carbon 1 0.414 0.414 1.0362 0.3143
> O3:Harv.:Carbon 1 0.020 0.020 0.0508 0.8226
> Residuals 44 17.567 0.399
>
>
> *** Note change of location***
>
> Victoria Allison
> Landcare Research
> Private Bag 92170
> Auckland 1142
> New Zealand
> Phone: +64 9 574 4164
>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> WARNING: This email and any attachments may be confidential ...{{dropped}}
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>
______________________________________________
R-help at stat.math.ethz.ch 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