Re: [R] one-way ANOVA model, with one factor, an unbalanced design and unequal variances

From: peter dalgaard <pdalgd_at_gmail.com>
Date: Thu, 21 Apr 2011 21:07:46 +0200

On Apr 21, 2011, at 20:28 , Steven wrote:

> Hi,
>
> i'm looking for an R function to fit a one-way ANOVA with one factor
> containing 10 levels. The factor levels have different numbers of
> observations (varying between 20 to 40). For most of the dependent variables
> i'm testing there are unequal variances among the factor levels.
>
> I see the function oneway.test:
>
> oneway.test(variable ~ factor, data=dataset)
>
> which by default does not assume equal variances. I also see the basic ANOVA
> function (aov), which, I think, is OK for unbalanced designs. I get a
> different F ratio, however, when using these two functions on the same data,
> which seems to indicate that the aov function assumes equal variances.
>
> My question: is there an R function that performs a one-way ANOVA while not
> assuming a balanced design *or* equal variances? Does the oneway.test
> function, for example, assume a balanced design?

Neither of them assumes a balanced design. This only comes into play

(a) for random effects where aov() effectively assumes it (or rather, it does something truly bizarre when they are not balanced...)

(b) when there are two or more factors, but only in the sense that the terms in the anova table may not be interchangeable.

-- 
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes_at_cbs.dk  Priv: PDalgd_at_gmail.com

______________________________________________
R-help_at_r-project.org 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.
Received on Thu 21 Apr 2011 - 19:10:00 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 Thu 21 Apr 2011 - 19:10:31 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive