## Estimate a simple model
filter.est <- ols(sales ~ price, data = data.filter)
## Perform Durbin Watson test for positive autocorrelation rho > 0 (i.e. d < 2)
test.results <- dw.test(filter.est)
## Print the test results
test.results
## Calculate DW null-distribution and plot the test results
plot(test.results)
Run the code above in your browser using DataLab