Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjusted Dickey Fuller test #966

Closed
Mkranj opened this issue Sep 5, 2024 · 3 comments
Closed

Adjusted Dickey Fuller test #966

Mkranj opened this issue Sep 5, 2024 · 3 comments

Comments

@Mkranj
Copy link

Mkranj commented Sep 5, 2024

Hi, I'm interested in performing an ADF test to confirm that my transformations ended up with a stationary time series.
I couldn't find a function to let me perform the test by itself, so I was wondering if this approach is appropriate:

library(forecast)
wineind |> ndiffs(test = "adf")

Basically I'm trying to get the answer to "how many times should this series be differenced to be considered stationary" and expecting the answer to be 0 to consider this stationary per ADF test. So if I already differenced a non-stationary series and used that inside ndiffs(), the result should be 0.

Am I correct in this interpretation? Is there another way to conduct an ADF test I missed?

@mitchelloharawild
Copy link
Collaborator

Yes, your interpretation is correct.
This function uses urca::ur.df, so if you want to perform the test directly you can use that function.

@Mkranj
Copy link
Author

Mkranj commented Sep 6, 2024

Thank you!
I didn't really get how to interpret ur.df() results (mainly how to get p value) and parameters, guess I'll stick to the originally proposed method

@mitchelloharawild
Copy link
Collaborator

No worries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants