statsmodels.tsa.ardl.ardl_select_order

statsmodels.tsa.ardl.ardl_select_order(endog, maxlag, exog, maxorder, trend='c', *, fixed=None, causal=False, ic='bic', glob=False, seasonal=False, deterministic=None, hold_back=None, period=None, missing='none')[source]

ARDL order selection

Parameters:
endogarray_like

A 1-d endogenous response variable. The dependent variable.

maxlagint

The maximum lag to consider for the endogenous variable.

exogarray_like

Exogenous variables to include in the model. Either a DataFrame or an 2-d array-like structure that can be converted to a NumPy array.

maxorder{int, dict}

If int, sets a common max lag length for all exog variables. If a dict, then sets individual lag length. They keys are column names if exog is a DataFrame or column indices otherwise.

trend{‘n’, ‘c’, ‘t’, ‘ct’}, optional

The trend to include in the model:

  • ‘n’ - No trend.

  • ‘c’ - Constant only.

  • ‘t’ - Time trend only.

  • ‘ct’ - Constant and time trend.

The default is ‘c’.

fixedarray_like

Additional fixed regressors that are not lagged.

causalbool, optional

Whether to include lag 0 of exog variables. If True, only includes lags 1, 2, …

ic{“aic”, “bic”, “hqic”}

The information criterion to use in model selection.

globbool

Whether to consider all possible submodels of the largest model or only if smaller order lags must be included if larger order lags are. If True, the number of model considered is of the order 2**(maxlag + k * maxorder) assuming maxorder is an int. This can be very large unless k and maxorder are bot relatively small. If False, the number of model considered is of the order maxlag*maxorder**k which may also be substantial when k and maxorder are large.

seasonalbool, optional

Flag indicating whether to include seasonal dummies in the model. If seasonal is True and trend includes ‘c’, then the first period is excluded from the seasonal terms.

deterministicDeterministicProcess, optional

A deterministic process. If provided, trend and seasonal are ignored. A warning is raised if trend is not “n” and seasonal is not False.

hold_back{None, int}, optional

Initial observations to exclude from the estimation sample. If None, then hold_back is equal to the maximum lag in the model. Set to a non-zero value to produce comparable models with different lag length. For example, to compare the fit of a model with lags=3 and lags=1, set hold_back=3 which ensures that both models are estimated using observations 3,…,nobs. hold_back must be >= the maximum lag in the model.

period{None, int}, optional

The period of the data. Only used if seasonal is True. This parameter can be omitted if using a pandas object for endog that contains a recognized frequency.

missing{“none”, “drop”, “raise”}, optional

Available options are ‘none’, ‘drop’, and ‘raise’. If ‘none’, no NaN checking is done. If ‘drop’, any observations with NaNs are dropped. If ‘raise’, an error is raised. Default is ‘none’.

Returns:
ARDLSelectionResults

A results holder containing the selected model and the complete set of information criteria for all models fit.


Last update: Apr 19, 2024