Zurück zu den Modellen
Param Estimator

ARLagOrderSelector

Estimate optimal lag order for autoregressive models using information criteria.

Implements lag order selection for AR models by comparing different lag specifications using information criteria. Supports both sequential and global search strategies.

Schnellstart

python
from sktime.param_est.lag import ARLagOrderSelector

estimator = ARLagOrderSelector(maxlag, ic='bic', glob=False, trend='c', seasonal=False, hold_back=None, period=None, missing='none')

Parameter(8)

maxlagint
Maximum number of lags to consider
icstr, default=”bic”

Information criterion to use for model selection:

  • “aic”: Akaike Information Criterion

  • “bic”: Bayesian Information Criterion (default)

  • “hqic”: Hannan-Quinn Information Criterion

globbool, default=False
If True, searches globally across all lag combinations up to maxlag. If False, searches sequentially by adding one lag at a time.
trendstr, default=”c”

Trend to include in the model:

  • “n”: No trend

  • “c”: Constant only

  • “t”: Time trend only

  • “ct”: Constant and time trend

seasonalbool, default=False
Whether to include seasonal dummies in the model
hold_backint, optional (default=None)
Number of initial observations to exclude from the estimation sample
periodint, optional (default=None)
Period of the data (used only if seasonal=True)
missingstr, default=”none”

How to handle missing values:

  • “none”: No handling

  • “drop”: Drop missing observations

  • “raise”: Raise an error

Beispiele

>>> from sktime.datasets import load_airline
>>> from sktime.param_est.lag import ARLagOrderSelector
>>> y = load_airline ()
>>> selector = ARLagOrderSelector (maxlag = 12, ic = "bic")
>>> selector. fit (y) ARLagOrderSelector(
... )
>>> selector. selected_model_ (3,)
>>> selector. ic_value_ 1369.6963340649502