How Exactly Bic In Augmented Dickey–fuller Test Work In Python?
Solution 1:
When we request automatic lag selection in adfulller, then the function needs to compare all models up to the given maxlag
lags. For this comparison we need to use the same observations for all models. Because lagged observations enter the regressor matrix we loose observations as initial conditions corresponding to the largest lag included.
As a consequence autolag
uses nobs - maxlags
observations for all models. For calculating the test statistic for adfuller itself, we don't need model comparison anymore and we can use all observations available for the chosen lag, i.e. nobs - best_lag
.
More general, how to treat initial conditions and different number of initial conditions is not always clear cut, autocorrelation and partial autocorrelation are largely based on using all available observations, full MLE for AR and ARMA models uses the stationary model to include the initial conditions, while conditional MLE or least squares drops them as necessary.
Post a Comment for "How Exactly Bic In Augmented Dickey–fuller Test Work In Python?"