ADF test: Lag selection in function ur.df() does not work

I am performing ADF tests with the help of the function ur.df() from package urca. It looks like this:

ur.df(MySeries, type = "trend", lags = 8, selectlags = "AIC")

According to the help section for the function, when lags are set and when selectlags are not "Fixed", lags should be chosen with the information criterion. However, the function NEVER chooses anything else than the maximum number of lags specified with lags.

Do I miss something? How can I get the function to actually use the information criterion?

See: ur.df function - RDocumentation

I solved it. The function just did not anywhere show the number of lags chosen. I had to infer this from the list of coefficients.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.