Displaying 1 result from an estimated 1 matches for "_positive_".
Did you mean:
_positives_
2011 Mar 16
1
Autocorrelation in linear models
...y
of tests for lag=1:
stats::cor.test(residuals(fm)[-n], residuals(fm)[-1])
stats::Box.test(residuals(fm))
lmtest::dwtest(fm, alternative="two.sided")
lmtest::bgtest(fm, type="F")
In my model, a simple lm(y~x1+x2) with n=20 annual measurements, I have
significant _positive_ autocorrelation within Y and within both X vectors,
but _negative_ autocorrelation in the residuals. The residual
autocorrelation is not quite significant, with the p-values
0.070
0.064
0.125
0.077
from the tests above. I seem to remember some authors saying that the
Durbin-Watson...