Skip to content

BUG: Augmented dickey-fuller test with fewer than 9 observations. #5432

Closed

Description

@sbnbari

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.
error1
data with yearly basis trends in the above picture
error2

Activity

  1. changed the title [-]ValueError: maxlag should be < nobs....... in ARIMA[/-] [+]BUG: Augmented dickey-fuller test with fewer than 9 observations.[/+] on Dec 20, 2018
  2. ChadFulton commented on Dec 20, 2018

    @ChadFulton
    Member

    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.

  3. ChadFulton commented on Dec 20, 2018

    @ChadFulton
    Member

    In the meantime, you can make this work by specifying maxlag=4 in your adfuller call.

  4. self-assigned this
    on May 10, 2019
  5. added 2 commits that reference this issue on May 11, 2019
    6b996a5
    b1cf266
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions