Skip to content

Specifying error terms in aov and lme

2 messages · Nathaniel Street, Peter Dalgaard

#
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?

I'm basing the need for this on this table from Zar,

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

for random you can use error if the interaction is not significant (I have 
been told). 

I want to make sure that the correct error terms are always being used.

Thanks for your help
#
Nathaniel Street <N.R.STREET at soton.ac.uk> writes:
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.
Now that can actually be horribly wrong if there is significant
interaction.
wrong again.....