3

I have a residuals series from OLS regression (out.lm) where I do NOT have lagged dependent variable as a predictor. My residual series has about 1700 numbers. I ran DW test in R, which gave results as follows:

dwtest(out.lm)
    Durbin-waston test
    data: out.lm
    DW = 2.1554, p-value = 0.9992

I know DW test only counts autocorrelation at lag 1, so I used Ljung-box with lag 1 to verify it, but it gave me a quite different result.

Box.test(out.lm$residuals,1,type="Ljung-Box")
X-squared = 10.61, df =1 ,p-value = 0.001125

Same contradiction observed for Breusch-Godfrey test:

bgtest(out.lm)
LM test = 13.448, df =1, p-value = 0.0002452

I also tried different lags for Ljung-Box and BG test, it gave similar result as lag 1.

Why different conclusion? Even if it is possible to have a different conclusion from different tests, why is the difference surprisingly large? Did I do anything wrong or misunderstand anything here? I also attached acf/pacf plot for the residuals. The serial correlation actually looks not very bad for me. May I know what should be the right conclusion here or what else I can do to make a better conclusion?

acf and pacf for my residual: img

Mario
  • 341
  • 2
  • 12
autor
  • 31
  • 1
  • 1
    Use dwtest(out.lm ,alternative ="two.sided") to have the alternative hypothesis: **autocorrelation is not 0** instead of **autocorrelation is greater than 0**. – user276722 Mar 16 '20 at 12:16

0 Answers0