I have an unbalanced design with two factors, gender and site. I'm trying to test for differences in a size variable. Levene's test reveals that the data has equal variances. However, log transformed size variables are not normally distributed, nor are the residuals from the ANOVA test. Below are my R codes up to this point:
test.aov <- aov(log(ssize) ~ class$Site * class$Sex)
aov_residuals <- residuals(object = test.aov)
shapiro.test(x = aov_residuals )
W = 0.95049, p-value = 6.67e-06
I know there is a Kruskal-Wallis test as a non-parametric replacement for one way ANOVA. But I don't know how to perform a non-parametric variance analysis for two factors.
Should I just go ahead with type III ANOVA and ignore the assumption of normality? Or, should I split the data in two for each gender and do separate Kruskal-Wallis tests? Or am I totally wrong and there is a better (even an obvious) way to go?