# 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? Commented 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.

• Thanks. I checked the F-statistic I get with the flat model in R against the F-statistic against the 3-way model I'm using in Stata and they agree! This greatly simplifies my analysis and really improves my results! Commented Mar 12, 2014 at 18:32
• You're welcome, @NoMoreData. Commented Mar 12, 2014 at 18:43
• Is there a good way to state this in a scientific paper without sounding statistically incompetent? :) Commented Mar 12, 2014 at 20:14
• I'm not sure what way to put it other people will be most familiar with. I don't see any problem with the way you phrased this. I suppose I might say something like, 'We ran all 2 (profile) x 2 (drug) x 2 (disease) combinations of factor levels as a single one-way ANOVA with 8 levels to facilitate making the a-priori group comparisons that motivated our study. We found that..." Commented Mar 12, 2014 at 20:57
• Thanks. I have one more question. If one is reporting these results in an ANOVA table, should one show the results of the 3-way (full) ANOVA with F-statistics, or just the one way model? Commented Mar 13, 2014 at 12:31