statsmodels.tsa.stattools.arma_order_select_ic(y, max_ar=4, max_ma=2, ic='bic', trend='c', model_kw={}, fit_kw={})[source]

Returns information criteria for many ARMA models


y : array-like

Time-series data

max_ar : int

Maximum number of AR lags to use. Default 4.

max_ma : int

Maximum number of MA lags to use. Default 2.

ic : str, list

Information criteria to report. Either a single string or a list of different criteria is possible.

trend : str

The trend to use when fitting the ARMA models.

model_kw : dict

Keyword arguments to be passed to the ARMA model

fit_kw : dict

Keyword arguments to be passed to ARMA.fit.


obj : Results object

Each ic is an attribute with a DataFrame for the results. The AR order used is the row index. The ma order used is the column index. The minimum orders are available as ic_min_order.


This method can be used to tentatively identify the order of an ARMA process, provided that the time series is stationary and invertible. This function computes the full exact MLE estimate of each model and can be, therefore a little slow. An implementation using approximate estimates will be provided in the future. In the meantime, consider passing {method : ‘css’} to fit_kw.


>>> from statsmodels.tsa.arima_process import arma_generate_sample
>>> import statsmodels.api as sm
>>> import numpy as np
>>> arparams = np.array([.75, -.25])
>>> maparams = np.array([.65, .35])
>>> arparams = np.r_[1, -arparams]
>>> maparam = np.r_[1, maparams]
>>> nobs = 250
>>> np.random.seed(2014)
>>> y = arma_generate_sample(arparams, maparams, nobs)
>>> res = sm.tsa.arma_order_select_ic(y, ic=['aic', 'bic'], trend='nc')
>>> res.aic_min_order
>>> res.bic_min_order

Previous topic


Next topic


This Page