powered by
Autocorrelation tests
ac_test(x, lag_max = 5)
the residuals or an ivx object.
ivx
the maximum length of lags.
obj <- ivx(hpi ~ cpi + def + int + log(res), data = ylpc) lmtest::bgtest(hpi ~ cpi + def + int + log(res), data = ylpc) ac_test(obj, 5)
Run the code above in your browser using DataLab