powered by
dwtest
dwtest(formula, data=list())
"htest"
lm
x <- c(1:30) ut <- c(1:30) # creating a ARMA(1) process for(i in (2:30)) { ut[i] <- 1 * ut[i-1] + rnorm(1,0,2) } y <- x + ut dw <- dwtest(y ~ x)
Run the code above in your browser using DataLab