Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

ANOVA is equivalent to linear regression with the use of suitable dummy variables. The conclusions remain the same irrespective of whether you use ANOVA or linear regression.

In light of their equivalence, is there any reason why ANOVA is used instead of linear regression?

Note: I am particularly interested in hearing about technical reasons for the use of ANOVA instead of linear regression.

Edit

Here is one example using one-way ANOVA. Suppose, you want to know if the average height of male and females is the same. To test for your hypothesis you would collect data from a random sample of male and females (say 30 each) and perform the ANOVA analysis (i.e., sum of squares for gender and error) to decide whether an effect exists.

You could also use linear regression to test for this as follows:

Define: $\text{Gender} = 1$ if respondent is a male and $0$ otherwise. $$ \text{Height} = \text{Intercept} + \beta * \text{Gender} + \text{error} $$ where: $\text{error}\sim\mathcal N(0,\sigma^2)$

Then a test of whether $\beta = 0$ is a an equivalent test for your hypothesis.

share|improve this question
2  
If I am not mistaken, linear regression is the estimation of coefficients that define a good linear map from X to Y. ANOVA is a test to know if there is significant differences in X when Y take two different values. Can you explain us why you think they are the same? – robin girard Jul 23 '10 at 15:29
8  
ANOVA can be seen as "syntactic sugar" for a special subgroup of linear regression models. ANOVA is regularly used by researchers who are not statisticians by training. They are now "institutionalized" and its hard to convert them back to using the more general representation ;-) – suncoolsu Oct 14 '10 at 16:52

4 Answers

up vote 21 down vote accepted

As an economist, the analysis of variance (ANOVA) is taught and usually understood in relation to linear regression (e.g. in Arthur Goldberger's A Course in Econometrics). Economists/Econometricians typically view ANOVA as uninteresting and prefer to move straight to regression models. From the perspective of linear (or even generalised linear) models, ANOVA assigns coefficients into batches, with each batch corresponding to a "source of variation" in ANOVA terminology.

Generally you can replicate the inferences you would obtain from ANOVA using regression but not always OLS regression. Multilevel models are needed for analysing hierarchical data structures such as "split-plot designs," where between-group effects are compared to group-level errors, and within-group effects are compared to data-level errors. Gelman's paper [1] goes into great detail about this problem and effectively argues that ANOVA is an important statistical tool that should still be taught for it's own sake.

In particular Gelman argues that ANOVA is a way of understanding and structuring multilevel models. Therefore ANOVA is not an alternative to regression but as a tool for summarizing complex high-dimensional inferences and for exploratory data analysis.

Gelman is a well-respected statistician and some credence should be given to his view. However, almost all of the empirical work that I do would be equally well served by linear regression and so I firmly fall into the camp of viewing it as a little bit pointless. Some disciplines with complex study designs (e.g. psychology) may find ANOVA useful.

[1] Gelman, A. (2005). Analysis of variance: why it is more important than ever (with discussion). Annals of Statistics 33, 1–53.

share|improve this answer
Thanks for the Gelman reference. I will read his paper. But, can't we analyze multilevel models using classical maximum likelihood? I agree that OLS is inefficient/inappropriate for multi-level models. – user28 Jul 23 '10 at 15:50
1  
+1 just for the lovely lucid even-handedness of this answer. – walkytalky Jul 23 '10 at 15:56
2  
@Srikant - there any many ways to deal with multilevel data and Gelman is "the king" of this field. His point is that ANOVA is a simple/clear method of capturing the key features of complex and hierarchical data structures or study designs and ANOVA is a simple/clear way of presenting the key results. In this sense it's role is complementary or exploratory. – Graham Cookson Jul 23 '10 at 16:30
+1 for a nice clear answer. Paragraph 3 is essentially what I was taught as a biology undergraduate, with emphasis laid on the ease of combining continuous and categorical independent variables in an ANOVA framework. – Freya Harrison Mar 14 '11 at 15:43

I think Graham's second paragraph gets at the heart of the matter. I suspect it's not so much technical than historical, probably due to the influence of "Statistical Methods for Research Workers", and the ease of teaching/applying the tool for non-statisticans in experimental analysis involving discrete factors, rather than delving into model building and associated tools. In statistics, ANOVA is usually taught as a special case of regression. (I think this is similar to why biostatistics is filled with a myriad of eponymous "tests" rather than emphasizing model building.)

share|improve this answer

ANOVA can be used with categorical explanatory variables (factors) that take more than 2 values (levels), and gives a basic test that the mean response is the same for every value. This avoids the regression problem on carrying multiple pairwise t-tests between those levels:

  • Multiple t-tests on a fixed 5% significance level, would make roughly 5% of them give wrong results.
  • These tests are not independed from each other. Comparing A's levels with B's is connected with comparing A's to C's, as A's data are used in both tests.

It is better to use contrasts for different combinations on the factor levels you want to test.

share|improve this answer
1  
You may wish to clarify this answer; as written, I see 3 issues. The first 2 are a little nit-picky but should still be edited, the third is substantive in the context of this discussion. (1) ANOVA can be used with only 2 groups (although most people just run a t-test then). (2) multiple t-tests w/ $\alpha=.05$ will asymptotically yield type I errors for 5% of those contrasts where no actual difference exists; how many errors will occur depends on how many nulls are true. – gung Dec 21 '11 at 0:43
3  
(3) your answer implies the problem of multiple comparisons applies to OLS regression, which it does not, when conducted properly. The proper way to test a factor in a regression context is to test the nested model with all factor dummies dropped against the full model with all factor dummies included. This test is identical to the one an ANOVA conducts. It is true that you should not use the tests of the individual dummy variables (which I suspect is what you are trying to describe here). – gung Dec 21 '11 at 0:48

I would say that some of you are using the term regression when you should be using general linear model. I think of regression as a glm that involves continuous covariates. When continuous covariates are combined with dummy variables that should be called analysis of covariance. If only dummy variables are used we refer to that special form of glm as analysis of variance. I think analysis of variance has a distinct second meaning as the procedure for testing for significant coefficients in a glm using the decomposition of variance into model term components and the error term component.

share|improve this answer
(+1) I have also immediately noted the ambiguous terminology "regression" throughout the discussion. – Stéphane Laurent Aug 18 '12 at 17:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.