statsmodels.tsa.ar_model.AutoRegResults#

class statsmodels.tsa.ar_model.AutoRegResults(model, params, cov_params, normalized_cov_params=None, scale=1.0, use_t=False, summary_text='')[source]#

Class to hold results from fitting an AutoReg model

Parameters:
modelAutoReg

Reference to the model that is fit.

paramsndarray

The fitted parameters from the AR Model.

cov_paramsndarray

The estimated covariance matrix of the model parameters.

normalized_cov_paramsndarray

The array inv(dot(x.T,x)) where x contains the regressors in the model.

scalefloat, optional

An estimate of the scale of the model.

use_tbool, optional

Whether use_t was set in fit

summary_textstr, optional

Additional text to append to results summary

Attributes:
aic

Akaike Information Criterion using Lutkepohl’s definition

\(-2 llf + \ln(nobs) (1 + df_{model})\)

aicc

Akaike Information Criterion with small sample correction

\(2.0 * df_{model} * nobs / (nobs - df_{model} - 1.0)\)

ar_lags

The autoregressive lags included in the model

arfreq

Returns the frequency of the AR roots

This is the solution, x, to z = abs(z)*exp(2j*np.pi*x) where z are the roots.

bic

Bayes Information Criterion

\(-2 llf + \ln(nobs) (1 + df_{model})\)

bse

The standard errors of the estimated parameters

If method is ‘cmle’, then the standard errors that are returned are the OLS standard errors of the coefficients. If the method is ‘mle’ then they are computed using the numerical Hessian.

centered_tss

The total (weighted) sum of squares centered about the mean

df_model

The degrees of freedom consumed by the model

df_resid

The remaining degrees of freedom in the residuals

ess

The explained sum of squares

If a constant is present, the centered total sum of squares minus the sum of squared residuals. If there is no constant, the uncentered total sum of squares is used.

fittedvalues

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

Final prediction error using Lütkepohl’s definition

\(((nobs+df_{model})/(nobs-df_{model})) \sigma^2\)

hqic

Hannan-Quinn Information Criterion using Lutkepohl’s definition

\(-2 llf + 2 \ln(\ln(nobs)) (1 + df_{model})\)

llf

Log-likelihood of model

nobs

The number of observations after adjusting for losses due to lags

params

The estimated parameters

pvalues

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

resid

The residuals of the model

roots

The roots of the AR process

The roots 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.

rsquared

R-squared of the model

This is defined here as 1 - ssr/centered_tss if the constant is included in the model and 1 - ssr/uncentered_tss if the constant is omitted.

ssr

Sum of squared (whitened) residuals

tvalues

Return the t-statistic for a given parameter estimate

uncentered_tss

Uncentered sum of squares

The sum of the squared values of the (whitened) endogenous response variable.

use_t

Flag indicating to use the Student’s distribution in inference

Methods

append(endog[, exog, refit, fit_kwargs])

Append observations to the ones used to fit the model

apply(endog[, exog, refit, fit_kwargs])

Apply the fitted parameters to new data unrelated to the original data

conf_int([alpha, cols])

Construct confidence interval for the fitted parameters

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

Compute the variance/covariance matrix

diagnostic_summary()

Returns a summary containing standard model diagnostic tests

f_test(r_matrix[, cov_p, invcov])

Compute the F-test for a joint linear hypothesis

forecast([steps, exog])

Out-of-sample forecasts

get_prediction([start, end, dynamic, exog, ...])

Predictions and prediction intervals

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_diagnostics([lags, fig, figsize])

Diagnostic plots for standardized residuals

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

Plot in- and out-of-sample predictions

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

In-sample prediction and out-of-sample forecasting

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

t_test(r_matrix[, cov_p, use_t])

Compute a t-test for 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

test_heteroskedasticity([lags])

ARCH-LM test of residual heteroskedasticity

test_normality()

Test for normality of standardized residuals

test_serial_correlation([lags, model_df])

Ljung-Box test for residual serial correlation

wald_test(r_matrix[, cov_p, invcov, use_f, ...])

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

scale

sigma2

Methods

append(endog[, exog, refit, fit_kwargs])

Append observations to the ones used to fit the model

apply(endog[, exog, refit, fit_kwargs])

Apply the fitted parameters to new data unrelated to the original data

conf_int([alpha, cols])

Construct confidence interval for the fitted parameters

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

Compute the variance/covariance matrix

diagnostic_summary()

Returns a summary containing standard model diagnostic tests

f_test(r_matrix[, cov_p, invcov])

Compute the F-test for a joint linear hypothesis

forecast([steps, exog])

Out-of-sample forecasts

get_prediction([start, end, dynamic, exog, ...])

Predictions and prediction intervals

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_diagnostics([lags, fig, figsize])

Diagnostic plots for standardized residuals

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

Plot in- and out-of-sample predictions

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

In-sample prediction and out-of-sample forecasting

remove_data()

Remove data arrays, all nobs arrays from result and model

save(fname[, remove_data])

Save a pickle of this instance

scale()

sigma2()

summary([alpha])

Summarize the Model

t_test(r_matrix[, cov_p, use_t])

Compute a t-test for 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

test_heteroskedasticity([lags])

ARCH-LM test of residual heteroskedasticity

test_normality()

Test for normality of standardized residuals

test_serial_correlation([lags, model_df])

Ljung-Box test for residual serial correlation

wald_test(r_matrix[, cov_p, invcov, use_f, ...])

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

Akaike Information Criterion using Lutkepohl's definition

aicc

Akaike Information Criterion with small sample correction

ar_lags

The autoregressive lags included in the model

arfreq

Returns the frequency of the AR roots

bic

Bayes Information Criterion

bse

The standard errors of the estimated parameters

centered_tss

The total (weighted) sum of squares centered about the mean

df_model

The degrees of freedom consumed by the model

df_resid

The remaining degrees of freedom in the residuals

ess

The explained sum of squares

fittedvalues

The in-sample predicted values of the fitted AR model

fpe

Final prediction error using Lütkepohl's definition

hqic

Hannan-Quinn Information Criterion using Lutkepohl's definition

llf

Log-likelihood of model

nobs

The number of observations after adjusting for losses due to lags

params

The estimated parameters

pvalues

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

resid

The residuals of the model

roots

The roots of the AR process

rsquared

R-squared of the model

ssr

Sum of squared (whitened) residuals

tvalues

Return the t-statistic for a given parameter estimate

uncentered_tss

Uncentered sum of squares

use_t

Flag indicating to use the Student's distribution in inference