Question

I wanted to test a model with the following:

summary(aov(dep~ind.1*ind.2))

But the p.values are not interpetable as the assumptions of normality and homoscedasticity are not respected. I'm looking for a non-parametric test that could replace this two-way anova (and more generally an n-way Anova)

Is the Durbin-Watson test a good solution ?

I'm trying to run a Durbin-Watson test but I don't succeed !

require(lmtest)
dwtest(dep~ind.1*ind.2) # Fail
dwtest(lm(dep~ind.1*ind.2)) # I get only one p.value instead of the three I expected

In order to make my question reproducible, here is some data:

set.seed(34)
dep = runif(24,0,1)
ind.1 = rep(c(1,2),12)
ind.2 = rep(c(1,2),each=12)
Was it helpful?

Solution

The Durbin-Watson statistic is primarily used to detect autocorrelation for a time-series analysis, not ANOVA.

You may want to look into the Kruskal-Wallis H test ranked sum test: http://www.anselm.edu/homepage/jpitocch/biostats/nonparamstats.html

There are a lot of resources on Google if you search "R Kruskal-Wallis H test"

Good luck!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top