[R] Repeated measures by lme and aov give different results

Spencer Graves spencer.graves at pdf.com
Thu Nov 16 22:14:18 CET 2006


      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%20aov).  
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%20aov).  


      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.
>



More information about the R-help mailing list