statsmodels.tsa.arima_model.ARMAResults

class statsmodels.tsa.arima_model.ARMAResults(model, params, normalized_cov_params=None, scale=1.0)[source]

Class to hold results from fitting an ARMA model.

Parameters
modelARMA instance

The fitted model instance

paramsarray

Fitted parameters

normalized_cov_paramsarray, optional

The normalized variance covariance matrix

scalefloat, optional

Optional argument to scale the variance covariance matrix.

Attributes
aicfloat

Akaike Information Criterion \(-2*llf+2* df_model\) where df_model includes all AR parameters, MA parameters, constant terms parameters on constant terms and the variance.

arparamsarray

The parameters associated with the AR coefficients in the model.

arrootsarray

The roots of the AR coefficients are the solution to (1 - arparams[0]*z - arparams[1]*z**2 -…- arparams[p-1]*z**k_ar) = 0 Stability requires that the roots in modulus lie outside the unit circle.

bicfloat

Bayes Information Criterion -2*llf + log(nobs)*df_model Where if the model is fit using conditional sum of squares, the number of observations nobs does not include the p pre-sample observations.

bsearray

The standard errors of the parameters. These are computed using the numerical Hessian.

df_modelarray

The model degrees of freedom = k_exog + k_trend + k_ar + k_ma

df_residarray

The residual degrees of freedom = nobs - df_model

fittedvaluesarray

The predicted values of the model.

hqicfloat

Hannan-Quinn Information Criterion -2*llf + 2*(df_model)*log(log(nobs)) Like bic if the model is fit using conditional sum of squares then the k_ar pre-sample observations are not counted in nobs.

k_arint

The number of AR coefficients in the model.

k_exogint

The number of exogenous variables included in the model. Does not include the constant.

k_maint

The number of MA coefficients.

k_trendint

This is 0 for no constant or 1 if a constant is included.

llffloat

The value of the log-likelihood function evaluated at params.

maparamsarray

The value of the moving average coefficients.

marootsarray

The roots of the MA coefficients are the solution to (1 + maparams[0]*z + maparams[1]*z**2 + … + maparams[q-1]*z**q) = 0 Stability requires that the roots in modules lie outside the unit circle.

modelARMA instance

A reference to the model that was fit.

nobsfloat

The number of observations used to fit the model. If the model is fit using exact maximum likelihood this is equal to the total number of observations, n_totobs. If the model is fit using conditional maximum likelihood this is equal to n_totobs - k_ar.

n_totobsfloat

The total number of observations for endog. This includes all observations, even pre-sample values if the model is fit using css.

paramsarray

The parameters of the model. The order of variables is the trend coefficients and the k_exog exogenous coefficients, then the k_ar AR coefficients, and finally the k_ma MA coefficients.

pvaluesarray

The p-values associated with the t-values of the coefficients. Note that the coefficients are assumed to have a Student’s T distribution.

residarray

The model residuals. If the model is fit using ‘mle’ then the residuals are created via the Kalman Filter. If the model is fit using ‘css’ then the residuals are obtained via scipy.signal.lfilter adjusted such that the first k_ma residuals are zero. These zero residuals are not returned.

scalefloat

This is currently set to 1.0 and not used by the model or its results.

sigma2float

The variance of the residuals. If the model is fit by ‘css’, sigma2 = ssr/nobs, where ssr is the sum of squared residuals. If the model is fit by ‘mle’, then sigma2 = 1/nobs * sum(v**2 / F) where v is the one-step forecast error and F is the forecast error variance. See nobs for the difference in definitions depending on the fit.

Methods

conf_int([alpha, cols])

Construct confidence interval for the fitted parameters.

cov_params([r_matrix, column, scale, cov_p, …])

Compute the variance/covariance matrix.

f_test(r_matrix[, cov_p, scale, invcov])

Compute the F-test for a joint linear hypothesis.

forecast([steps, exog, alpha])

Out-of-sample forecasts

initialize(model, params, **kwargs)

Initialize (possibly re-initialize) a Results instance.

load(fname)

Load a pickled results instance

normalized_cov_params()

See specific model class docstring

plot_predict([start, end, exog, dynamic, …])

Plot forecasts

predict([start, end, exog, dynamic])

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

remove_data()

Remove data arrays, all nobs arrays from result and model.

save(fname[, remove_data])

Save a pickle of this instance.

summary([alpha])

Summarize the Model

summary2([title, alpha, float_format])

Experimental summary function for ARIMA Results

t_test(r_matrix[, cov_p, scale, use_t])

Compute a t-test for a each linear hypothesis of the form Rb = q.

t_test_pairwise(term_name[, method, alpha, …])

Perform pairwise t_test with multiple testing corrected p-values.

wald_test(r_matrix[, cov_p, scale, invcov, …])

Compute a Wald-test for a joint linear hypothesis.

wald_test_terms([skip_single, …])

Compute a sequence of Wald tests for terms over multiple columns.

Properties

aic

arfreq

Returns the frequency of the AR roots.

arparams

arroots

bic

bse

cov_params_default

fittedvalues

hqic

llf

mafreq

Returns the frequency of the MA roots.

maparams

maroots

pvalues

The two-tailed p values for the t-stats of the params.

resid

tvalues

Return the t-statistic for a given parameter estimate.

use_t

Flag indicating to use the Student’s distribution in inference.