Re: [R] unbalanced one-way ANOVA

From: Douglas Bates <>
Date: Thu, 28 Feb 2008 17:39:42 -0600

On Thu, Feb 28, 2008 at 7:52 AM, Nauta, A.L. <> wrote:
> Hi,

> I have an unbalanced dataset on which I would like to perform a one-way anova test using R (aov). According to Wannacott and Wannacott (1990) p. 333, one-way anova with unbalanced data is possible with a few modifications in the anova-calculations. The modified anova calculations should take into account different sample sizes and a modified definition of the average. I was wondering if the aov-function in R is suitable for one-way anova on unbalanced data.


The analysis of variance is performed in R by fitting a linear model created from indicator variables for the levels of the factor. This validity of this approach does not depend on balance in the data.

The formulas given in an introductory textbook are almost never the way that results are computed in practice. I think we would all be better off if they didn't even give these misleading formulas. mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 28 Feb 2008 - 23:45:46 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 29 Feb 2008 - 00:30:19 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive