Re: [R] Random Effects for One-Way Anova

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Thu 01 Dec 2005 - 00:57:03 EST

On Wed, 30 Nov 2005, Peter Dalgaard wrote:

> Prof Brian Ripley <ripley@stats.ox.ac.uk> writes:
>
>>> My questions is:
>>> which formula should I use if I want to use a random effects model?
>>> I think I should use "lme", but I don't know how.
>>
>> aov() is the function for anova modelling. so you want
>>
>> aov(A ~ B, data = DATA) # fixed effects
>> aov(A ~ Error(B), data = DATA) # random effects
>>
>> but a 1-way ANOVA with fixed or random effects is the same analysis, and
>> only the interpretation differs.
>
> Not quite. Only if the design is balanced and you're not looking to
> compute things like the variance of the estimated overall mean.

(That's part of the interpretation. An ANOVA does not give you that.)

> In the unbalanced case, I don't believe aov() is doing the right thing
> (it might not be very wrong, though, if the imbalance is slight) and
> lme/lmer is closer on the mark.

The example given in his follow-up posting was balanced, though.

I think it is pretty conventional to consider such ANOVAs to be balanced, and if they are not, to use the term to refer to the classical analyses even if they are not according to some definition `the right thing'.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@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
Received on Thu Dec 01 01:03:45 2005

This archive was generated by hypermail 2.1.8 : Thu 01 Dec 2005 - 02:33:30 EST