[R] Specifying error terms in aov and lme

Peter Dalgaard p.dalgaard at biostat.ku.dk
Thu Nov 4 13:52:48 CET 2004


Nathaniel Street <N.R.STREET at soton.ac.uk> writes:

> I need to specify error terms properly in a mixed-effects anova model. I 
> know you can add error terms in aov using Error and can specify random 
> factors in lme but I am not sure how these get treated.
> 
> When making the calculations for fixed and random factors, are the correct 
> error terms used and how can you get aov or lme to use different error 
> terms for fixed and random effects?

In short: Those considerations make sense for programs that give you
only a partitioning of the sum of squares. aov() and lme() should
(mostly) get things right automatically *if* you specify the model
correctly. With aov() you still need some know-how to test
significance of variance components, though.

 
> I'm basing the need for this on this table from Zar,
> 
> Both fixed factors - both tested against error

Now that can actually be horribly wrong if there is significant
interaction. 

> Both random factors - both tested against interaction MS
> 1 fixed - interaction MS
> 1 random - replicate MS

wrong again.....

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list