# Test Durbin Watson(error independence)

#### royer11

##### New Member
Hello, I am solving an example of Design of experiments of a variable (DCA).
It turns out that, on having applied logarithmic transformations, durbin watson throws a similar value, being the different graph

Code:
library(lmtest)

tb = data.frame("treat" = factor(x = c(rep(1:5, c(4,4,4,4,4)), labels = c("M1","M2","M3","M4","M5")),
"value" = c(110,157,194,178,1,2,4,18,880,1256,5276,4355,495,7040,5307,10050,7,5,29,2))
fit = aov(formula = value ~ treat, data=tb)

# durbin test
dwtest(fit)
plot(fit$residuals) # ----------------------------- # transformation -- log tb$value = log(tb$value) # durbin test dwtest(fit) plot(fit$residuals)
if you observe, the graphics are different

#### hlsmith

##### Less is more. Stay pure. Stay poor.
The implicit question was, why is your face so messed up Dason, why dont you fix it or something!

Or maybe something about why they are different. Which i would say is that you are proposing a different structural relationship between the variables (additive vs multiplicative?).

Last edited:

#### royer11

##### New Member
What is the question
If I have applied transformation, why is the result similar (dwtest = dwtest) and the graph is different?