1
$\begingroup$

My study design consists of two factors (one with 2 levels, the other with 6) and a continuous response variable. In order to analyze the influence of both factors on the explanatory variable I built a linear model in the following format:

modela<-lm(response~factor1*factor2, data=dataset)

I was going to run a 2-way ANOVA in order to test the significance of each of the explanatory variables however, upon evaluating the assumptions of this test, I found that the assumption of normality of residuals was violated (shown via a significant p-value from a Shapiro-Wilk test). All other assumptions (independent observations, no significant outliers, homogeneity of variances) were met.

Given this assumption violation is there a nonparametric alternative test that would be more appropriate to analyze my data. I have also read that transforming the data might help but I'm not sure a) if this would be appropriate and b) which transformations I should use.

Any help anyone can provide would be greatly appreciated.

Edit 1 - Here is the Q-Q plot for my model: enter image description here

Edit 2:

This is the output I got for the aligned ranks transformation ANOVA.

Call:
art(formula = Duration.egg ~ Temperature + Species + Temperature:Species, 
    data = egg.na.1)

Column sums of aligned responses (should all be ~0):
        Temperature             Species Temperature:Species 
                  0                   0                   0 

F values of ANOVAs on aligned responses not of interest (should all be ~0):
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
 0.0000  0.0000  0.0000  0.4130  0.1609  2.2636 
Warning message:
In summary.art(x) :
  F values of ANOVAs on aligned responses not of interest are not all ~0. ART may not be appropriate.
```
$\endgroup$
13
  • $\begingroup$ It's usually better to look at histogram of residuals or a Q-Q plot to assess the normality of residuals, rather than a hypothesis test. You might add these plots to your question to get some advice as to if the normality assumption is reasonably met. $\endgroup$ Commented Nov 22, 2022 at 17:33
  • $\begingroup$ @SalMangiafico I have added the Q-Q plot for my model $\endgroup$ Commented Nov 22, 2022 at 17:38
  • $\begingroup$ It's clear that your dependent variable is bounded on both the high and low ends, and that it is discrete. I wonder if there is an appropriate generalized linear model that would work. I'll be curious to hear other's more expert opinions. $\endgroup$ Commented Nov 22, 2022 at 17:59
  • $\begingroup$ If you want to go with a nonparametric model, aligned ranks transformation anova should work. It's relatively easy in R. With the caveat that I wrote it, there is an example here: rcompanion.org/handbook/F_16.html $\endgroup$ Commented Nov 22, 2022 at 18:02
  • $\begingroup$ @SalMangiafico Based on my research, doesn't an aligned ranks transformation ANOVA require a dependent variable that is ordinal? I apologize if this is a silly question as I have never heard of this test before $\endgroup$ Commented Nov 22, 2022 at 18:46

1 Answer 1

0
$\begingroup$

I think that the discussion in the comments largely addresses the question. Here are a few points.

  • Residuals for an ordinary least squares regression (OLS) don't need to be perfectly normal. On the one hand, nothing in the real world has a perfectly normal distribution. But also, OLS regression is somewhat robust to deviations from normality.
  • The data in this case appear to be discrete and bound on the upper and lower end. I don't know if I would recommend OLS in this case. My interpretation of the q-q plot is that the residuals are symmetric with light tails. OLS regression may be okay in this instance. I don't know.
  • A traditional nonparametric test for a two-factorial anova is the Scheirer–Ray–Hare test. This test is sometimes criticized. Also, there may not be a clear method for conducting post-hoc tests in all cases. There also may situations (unbalanced designs, small sample size) where the test may not be ideal.
  • A more contemporary nonparametric method is the aligned ranks transformation anova (ART anova). In the current implementation in R, there are methods for post-hoc analysis and effect size. However, it is advised to research situations in which the method may not perform well.
  • There are other methods that may be applicable, like permutation anova or quantile regression.
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.