You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG: Augmented dickey-fuller test with fewer than 9 observations. #5432
Hi
i'm trying the dickey fuller test on yearly data and want to make it stationary but im unable to do it. i have applied that test on monthly and daily but getting an error while applying the ADF on yearly data which i'm going to use for my ARIMA model. your help will be much appreciated.
data with yearly basis trends in the above picture
changed the title [-]ValueError: maxlag should be < nobs....... in ARIMA[/-][+]BUG: Augmented dickey-fuller test with fewer than 9 observations.[/+]on Dec 20, 2018
Thanks! This does look like a bug in adfuller, which is that if you try to run the test with fewer than 9 observations without specifying maxlag, it gives an error when trying to make lagmat.
As a side note, I think that after your rolling mean you only have 7 observations, and I suspect that the ADF test has very low power in this case, and may not be a useful guide in practice.
Activity
[-]ValueError: maxlag should be < nobs....... in ARIMA[/-][+]BUG: Augmented dickey-fuller test with fewer than 9 observations.[/+]ChadFulton commentedon Dec 20, 2018
Thanks! This does look like a bug in
adfuller, which is that if you try to run the test with fewer than 9 observations without specifyingmaxlag, it gives an error when trying to makelagmat.As a side note, I think that after your rolling mean you only have 7 observations, and I suspect that the ADF test has very low power in this case, and may not be a useful guide in practice.
ChadFulton commentedon Dec 20, 2018
In the meantime, you can make this work by specifying
maxlag=4in youradfullercall.BUG: Limit lag length in adf
BUG: Limit lag length in adf