# Can you convert three-way ANOVA to one-way ANOVA?

I'm analyzing some data from an experiment. There is one response variable (response) and 3 factor variables, each with 2 levels (profile, drug, disease). I want to compare specific combinations of (profile, drug,disease), e.g. (profile 1, drug 1, no disease) vs. (profile 1, drug 2, no disease). I've been approaching this problem as if it were an ANOVA design but I've hit some trouble when trying to make the specific comparisons I want.

I initially tried this analysis in R but couldn't find any information on how to do contrasts with a 3-way ANOVA design. I'm now using Stata, which is only slightly more user-friendly, but even that is giving me some trouble.

So what I've tried doing is writing some code to convert my different factor variables into one factor variable with more levels. So instead of (profile, drug, disease) we have profile:drug:disease E.g., profile1:drug1:disease1 and profile2:drug1:disease1 are different levels of the same factor variable (call it newFactor).

So can I run my analysis as a one-way ANOVA on newFactor (in R, this would be aov(response ~ newFactor) and then use contrasts to make comparisons between, e.g., profile1:drug1:disease1 and profile1:drug2:disease1? Is there anything wrong with this approach, statistically speaking?

Sorry for the long question, and thanks in advance for your help.

tl;dr version: I want to convert a 3-way ANOVA to a 1-way ANOVA by lumping all my factor variables into one new factor so that I can easily use contrasts.

• You should find the one-way ANOVA is equivalent to the three-way ANOVA with all interactions (including the three-way one). Do you? Mar 12, 2014 at 17:54

No, there is nothing wrong with doing this. This is sometimes called the 'flat' approach to factorial ANOVA (although I don't know how common that phrasing is). It is sometimes used when there are problems with your data, such as combinations of some levels in which there are no observations. As @Schortchi notes, you should get the same overall $F$-value / test for both models.