# How to cope with non-normal ANOVA residuals?

IV1    IV2    IV3    IV4    RV
1      1      0.5    B      5.3
2      2      1      U      15.3
2      1      0.5    A      51.3
3      3      2      B      5.35


where:

• IV1 has 3 levels: 1, 2 and 0.5
• IV2 has 3 levels: 1, 2 and 0.5
• IV3 has 3 levels: 1, 2 and 3
• IV4 has 3 levels: B, U, R, S, A

All of them are categorical. The response variable is times measured in seconds.

Due to the non-normality of the data and the heteroscedasticity I cannot use Analysis of Variance (ANOVA). I have tried five data transformations to see if I can apply ANOVA (square-root, 2-power, e-power, log, ln). None of these fixes the data so that they pass either visual exploration or Levene and Kolmogorov's tests. Non-parametric test (distribution-free) like Kruskal-Wallis or Freidman cannot handle factor interaction as can ANOVA.

What can I do?

• What does a Q-Q plot of the ANOVA residuals look like? Oct 29, 2014 at 16:26
• Oct 29, 2014 at 20:37
• Thanks. That's an ... interesting plot. Was the response variable (the times) almost discrete (lots of observations with the same or nearly the same value) or heavily multimodal? Oct 29, 2014 at 21:16
• there are several time measures that repeat Oct 30, 2014 at 21:58
• I'm trying to find some way to account for the odd structure in residuals. Is it only a small percentage? How does that occur? It seems to argue against treating it as continuous. Oct 30, 2014 at 22:05

Most of the answer can be found here: What is the non-parametric equivalent of a two-way ANOVA that can handle interactions? Namely, you would use ordinal logistic regression. This is probably your best bet. The way it would work is that you convert the times to ranks and regress the ranks onto your covariates using OLR. Certainly if $L$ seconds were greater than $k$ seconds then this contains valid ordinal information. Depending on the software you use, you may not even have to convert the times explicitly into ranks (it would be done for you under the assumption that bigger numbers correspond to higher ranks). Bear in mind that the Kruskal-Wallis test is a special case of OLR, so any time KW might be valid OLR is as well. However, OLR is more flexible than KW, for example, it can handle factorial structure and interactions.

However, in your case there is an additional possibility. Because your response variable is a duration, you could use survival analysis. If you can determine the right distribution, you could use a parametric approach, but most people will just use a Cox proportional hazards model.

• Oh yeah! I I forgot to mention I have try that method of transformation and it doesn't work The Box Cox method. Oct 28, 2014 at 23:22
• @rica01, what method of transformation? I don't recommend that you use any method of transformation. Just use OLR. Oct 28, 2014 at 23:24
• There is a huge difference between Cox model and Box Cox method, in the sense that these are completely different models. I suggest you look at the link gung gave in his answer. Oct 29, 2014 at 9:24
• "Ordinal logistic regression" with a response that is a time measured in seconds? Could you explain how that would work?
– whuber
Oct 29, 2014 at 14:03
• I would like to suggest that you include this clarification in your answer so that readers understand what you mean. I think it might be of doubtful value, though, because the ranking destroys what looks like useful information about the relative differences among the durations. And what do you do about ties?
– whuber
Oct 29, 2014 at 15:00