statsmodels.tsa.arima_model.ARMA

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

Autoregressive Moving Average ARMA(p,q) Model

Parameters
endogarray_like

The endogenous variable.

orderiterable

The (p,q) order of the model for the number of AR parameters, and MA parameters to use.

exogarray_like, optional

An optional array of exogenous variables. This should not include a constant or trend. You can specify this in the fit method.

datesarray_like, 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.

freqstr, 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.ARMA.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 ARMA(p,q) model using 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, dynamic])

ARMA model in-sample and out-of-sample prediction

score(params)

Compute the score function at params.

Properties

endog_names

Names of endogenous variables.

exog_names

The names of the exogenous variables.