statsmodels.tsa.ar_model.ARResults

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

Class to hold results from fitting an AR model.

Parameters:

model : AR Model instance

Reference to the model that is fit.

params : array

The fitted parameters from the AR Model.

normalized_cov_params : array

inv(dot(X.T,X)) where X is the lagged values.

scale : float, optional

An estimate of the scale of the model.

Attributes

bse() The standard errors of the parameter estimates.
llf() Log-likelihood of model
pvalues() The two-tailed p values for the t-stats of the params.
tvalues() Return the t-statistic for a given parameter estimate.
aic (float) Akaike Information Criterion using Lutkephol’s definition. \(log(sigma) + 2*(1 + k_ar + k_trend)/nobs\)
bic (float) Bayes Information Criterion \(\log(\sigma) + (1 + k_ar + k_trend)*\log(nobs)/nobs\)
fittedvalues (array) The in-sample predicted values of the fitted AR model. The k_ar initial values are computed via the Kalman Filter if the model is fit by mle.
fpe (float) Final prediction error using Lütkepohl’s definition ((n_totobs+k_trend)/(n_totobs-k_ar-k_trend))*sigma
hqic (float) Hannan-Quinn Information Criterion.
k_ar (float) Lag length. Sometimes used as p in the docs.
k_trend (float) The number of trend terms included. ‘nc’=0, ‘c’=1.
model (AR model instance) A reference to the fitted AR model.
nobs (float) The number of available observations nobs - k_ar
n_totobs (float) The number of total observations in endog. Sometimes n in the docs.
params (array) The fitted parameters of the model.
resid (array) The residuals of the model. If the model is fit by ‘mle’ then the pre-sample residuals are calculated using fittedvalues from the Kalman Filter.
roots (array) The roots of the AR process 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.
scale (float) Same as sigma2
sigma2 (float) The variance of the innovations (residuals).
trendorder (int) The polynomial order of the trend. ‘nc’ = None, ‘c’ or ‘t’ = 0, ‘ct’ = 1, etc.

Methods

aic()
bic()
bse() The standard errors of the parameter estimates.
conf_int([alpha, cols, method]) Returns the confidence interval of the fitted parameters.
cov_params([r_matrix, column, scale, cov_p, …]) Returns the variance/covariance matrix.
f_test(r_matrix[, cov_p, scale, invcov]) Compute the F-test for a joint linear hypothesis.
fittedvalues()
fpe()
hqic()
initialize(model, params, **kwd) Initialize (possibly re-initialize) a Results instance.
llf() Log-likelihood of model
load(fname) load a pickle, (class method); use only on trusted files, as unpickling can run arbitrary code.
normalized_cov_params() See specific model class docstring
predict([start, end, dynamic]) Returns in-sample and out-of-sample prediction.
pvalues() The two-tailed p values for the t-stats of the params.
remove_data() remove data arrays, all nobs arrays from result and model
resid()
roots()
save(fname[, remove_data]) save a pickle of this instance
scale()
sigma2()
summary() Summary
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
tvalues() Return the t-statistic for a given parameter estimate.
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