statsmodels.tsa.arima_model.ARIMA

class statsmodels.tsa.arima_model.ARIMA(endog, order, exog=None, dates=None, freq=None, missing='none')[source]

Autoregressive Integrated Moving Average ARIMA(p,d,q) Model

Parameters:
  • endog (array-like) – The endogenous variable.
  • order (iterable) – The (p,d,q) order of the model for the number of AR parameters, differences, and MA parameters to use.
  • exog (array-like, optional) – An optional array of exogenous variables. This should not include a constant or trend. You can specify this in the fit method.
  • dates (array-like of datetime, optional) – An array-like object of datetime objects. If a pandas object is given for endog or exog, it is assumed to have a DateIndex.
  • freq (str, optional) – The frequency of the time-series. A Pandas offset or ‘B’, ‘D’, ‘W’, ‘M’, ‘A’, or ‘Q’. This is optional if dates are given.

Notes

If exogenous variables are given, then the model that is fit is

\[\phi(L)(y_t - X_t\beta) = \theta(L)\epsilon_t\]

where \(\phi\) and \(\theta\) are polynomials in the lag operator, \(L\). This is the regression model with ARMA errors, or ARMAX model. This specification is used, whether or not the model is fit using conditional sum of square or maximum-likelihood, using the method argument in statsmodels.tsa.arima_model.ARIMA.fit. Therefore, for now, css and mle refer to estimation methods only. This may change for the case of the css model in future versions.

Methods

fit([start_params, trend, method, …]) Fits ARIMA(p,d,q) model by exact maximum likelihood via Kalman filter.
from_formula(formula, data[, subset, drop_cols]) Create a Model from a formula and dataframe.
geterrors(params) Get the errors of the ARMA process.
hessian(params) Compute the Hessian at params,
information(params) Fisher information matrix of model
initialize() Initialize (possibly re-initialize) a Model instance.
loglike(params[, set_sigma2]) Compute the log-likelihood for ARMA(p,q) model
loglike_css(params[, set_sigma2]) Conditional Sum of Squares likelihood function.
loglike_kalman(params[, set_sigma2]) Compute exact loglikelihood for ARMA(p,q) model by the Kalman Filter.
predict(params[, start, end, exog, typ, dynamic]) ARIMA model in-sample and out-of-sample prediction
score(params) Compute the score function at params.

Attributes

endog_names Names of endogenous variables
exog_names