statsmodels.tsa.vector_ar.vecm.VECMResults

class statsmodels.tsa.vector_ar.vecm.VECMResults(endog, exog, exog_coint, k_ar, coint_rank, alpha, beta, gamma, sigma_u, deterministic='n', seasons=0, first_season=0, delta_y_1_T=None, y_lag1=None, delta_x=None, model=None, names=None, dates=None)[source]

Class for holding estimation related results of a vector error correction model (VECM).

Parameters:
endogndarray (neqs x nobs_tot)

Array of observations.

exogndarray (nobs_tot x neqs) or None

Deterministic terms outside the cointegration relation.

exog_cointndarray (nobs_tot x neqs) or None

Deterministic terms inside the cointegration relation.

k_arint, >= 1

Lags in the VAR representation. This implies that the number of lags in the VEC representation (=lagged differences) equals \(k_{ar} - 1\).

coint_rankint, 0 <= coint_rank <= neqs

Cointegration rank, equals the rank of the matrix \(\Pi\) and the number of columns of \(\alpha\) and \(\beta\).

alphandarray (neqs x coint_rank)

Estimate for the parameter \(\alpha\) of a VECM.

betandarray (neqs x coint_rank)

Estimate for the parameter \(\beta\) of a VECM.

gammandarray (neqs x neqs*(k_ar-1))

Array containing the estimates of the \(k_{ar}-1\) parameter matrices \(\Gamma_1, \dots, \Gamma_{k_{ar}-1}\) of a VECM(\(k_{ar}-1\)). The submatrices are stacked horizontally from left to right.

sigma_undarray (neqs x neqs)

Estimate of white noise process covariance matrix \(\Sigma_u\).

deterministicstr {"n", "co", "ci", "lo", "li"}
  • "n" - no deterministic terms

  • "co" - constant outside the cointegration relation

  • "ci" - constant within the cointegration relation

  • "lo" - linear trend outside the cointegration relation

  • "li" - linear trend within the cointegration relation

Combinations of these are possible (e.g. "cili" or "colo" for linear trend with intercept). See the docstring of the VECM-class for more information.

seasonsint, default: 0

Number of periods in a seasonal cycle. 0 means no seasons.

first_seasonint, default: 0

Season of the first observation.

delta_y_1_Tndarray or None, default: None

Auxiliary array for internal computations. It will be calculated if not given as parameter.

y_lag1ndarray or None, default: None

Auxiliary array for internal computations. It will be calculated if not given as parameter.

delta_xndarray or None, default: None

Auxiliary array for internal computations. It will be calculated if not given as parameter.

modelVECM

An instance of the VECM-class.

nameslist of str

Each str in the list represents the name of a variable of the time series.

datesarray_like

For example a DatetimeIndex of length nobs_tot.

Attributes:
nobsint

Number of observations (excluding the presample).

modelsee Parameters
y_allsee endog in Parameters
exogsee Parameters
exog_cointsee Parameters
namessee Parameters
datessee Parameters
neqsint

Number of variables in the time series.

k_arsee Parameters
deterministicsee Parameters
seasonssee Parameters
first_seasonsee Parameters
alphasee Parameters
betasee Parameters
gammasee Parameters
sigma_usee Parameters
det_coef_cointndarray (#(determinist. terms inside the coint. rel.) x coint_rank)

Estimated coefficients for the all deterministic terms inside the cointegration relation.

const_cointndarray (1 x coint_rank)

If there is a constant deterministic term inside the cointegration relation, then const_coint is the first row of det_coef_coint. Otherwise it’s an ndarray of zeros.

lin_trend_cointndarray (1 x coint_rank)

If there is a linear deterministic term inside the cointegration relation, then lin_trend_coint contains the corresponding estimated coefficients. As such it represents the corresponding row of det_coef_coint. If there is no linear deterministic term inside the cointegration relation, then lin_trend_coint is an ndarray of zeros.

exog_coint_coefsndarray (exog_coint.shape[1] x coint_rank) or None

If deterministic terms inside the cointegration relation are passed via the exog_coint parameter, then exog_coint_coefs contains the corresponding estimated coefficients. As such exog_coint_coefs represents the last rows of det_coef_coint. If no deterministic terms were passed via the exog_coint parameter, this attribute is None.

det_coefndarray (neqs x #(deterministic terms outside the coint. rel.))

Estimated coefficients for the all deterministic terms outside the cointegration relation.

constndarray (neqs x 1) or (neqs x 0)

If a constant deterministic term outside the cointegration is specified within the deterministic parameter, then const is the first column of det_coef_coint. Otherwise it’s an ndarray of size zero.

seasonalndarray (neqs x seasons)

If the seasons parameter is > 0, then seasonal contains the estimated coefficients corresponding to the seasonal terms. Otherwise it’s an ndarray of size zero.

lin_trendndarray (neqs x 1) or (neqs x 0)

If a linear deterministic term outside the cointegration is specified within the deterministic parameter, then lin_trend contains the corresponding estimated coefficients. As such it represents the corresponding column of det_coef_coint. If there is no linear deterministic term outside the cointegration relation, then lin_trend is an ndarray of size zero.

exog_coefsndarray (neqs x exog_coefs.shape[1])

If deterministic terms outside the cointegration relation are passed via the exog parameter, then exog_coefs contains the corresponding estimated coefficients. As such exog_coefs represents the last columns of det_coef. If no deterministic terms were passed via the exog parameter, this attribute is an ndarray of size zero.

_delta_y_1_Tsee delta_y_1_T in Parameters
_y_lag1see y_lag1 in Parameters
_delta_xsee delta_x in Parameters
coint_rankint

Cointegration rank, equals the rank of the matrix \(\Pi\) and the number of columns of \(\alpha\) and \(\beta\).

llffloat

The model’s log-likelihood.

cov_paramsndarray (d x d)

Covariance matrix of the parameters. The number of rows and columns, d (used in the dimension specification of this argument), is equal to neqs * (neqs+num_det_coef_coint + neqs*(k_ar-1)+number of deterministic dummy variables outside the cointegration relation). For the case with no deterministic terms this matrix is defined on p. 287 in [1] as \(\Sigma_{co}\) and its relationship to the ML-estimators can be seen in eq. (7.2.21) on p. 296 in [1].

cov_params_wo_detndarray

Covariance matrix of the parameters \(\tilde{\Pi}, \tilde{\Gamma}\) where \(\tilde{\Pi} = \tilde{\alpha} \tilde{\beta'}\). Equals cov_params without the rows and columns related to deterministic terms. This matrix is defined as \(\Sigma_{co}\) on p. 287 in [1].

stderr_paramsndarray (d)

Array containing the standard errors of \(\Pi\), \(\Gamma\), and estimated parameters related to deterministic terms.

stderr_cointndarray (neqs+num_det_coef_coint x coint_rank)

Array containing the standard errors of \(\beta\) and estimated parameters related to deterministic terms inside the cointegration relation.

stderr_alphandarray (neqs x coint_rank)

The standard errors of \(\alpha\).

stderr_betandarray (neqs x coint_rank)

The standard errors of \(\beta\).

stderr_det_coef_cointndarray (num_det_coef_coint x coint_rank)

The standard errors of estimated the parameters related to deterministic terms inside the cointegration relation.

stderr_gammandarray (neqs x neqs*(k_ar-1))

The standard errors of \(\Gamma_1, \ldots, \Gamma_{k_{ar}-1}\).

stderr_det_coefndarray (neqs x det. terms outside the coint. relation)

The standard errors of estimated the parameters related to deterministic terms outside the cointegration relation.

tvalues_alphandarray (neqs x coint_rank)
tvalues_betandarray (neqs x coint_rank)
tvalues_det_coef_cointndarray (num_det_coef_coint x coint_rank)
tvalues_gammandarray (neqs x neqs*(k_ar-1))
tvalues_det_coefndarray (neqs x det. terms outside the coint. relation)
pvalues_alphandarray (neqs x coint_rank)
pvalues_betandarray (neqs x coint_rank)
pvalues_det_coef_cointndarray (num_det_coef_coint x coint_rank)
pvalues_gammandarray (neqs x neqs*(k_ar-1))
pvalues_det_coefndarray (neqs x det. terms outside the coint. relation)
var_rep(k_ar x neqs x neqs)

KxK parameter matrices \(A_i\) of the corresponding VAR representation. If the return value is assigned to a variable A, these matrices can be accessed via A[i] for \(i=0, \ldots, k_{ar}-1\).

cov_var_reprndarray (neqs**2 * k_ar x neqs**2 * k_ar)

This matrix is called \(\Sigma^{co}_{\alpha}\) on p. 289 in [1]. It is needed e.g. for impulse-response-analysis.

fittedvaluesndarray (nobs x neqs)

The predicted in-sample values of the models’ endogenous variables.

residndarray (nobs x neqs)

The residuals.

References

[1] (1,2,3,4)

Lütkepohl, H. 2005. New Introduction to Multiple Time Series Analysis. Springer.

Methods

conf_int_alpha([alpha])

conf_int_beta([alpha])

conf_int_det_coef([alpha])

conf_int_det_coef_coint([alpha])

conf_int_gamma([alpha])

irf([periods])

ma_rep([maxn])

orth_ma_rep([maxn, P])

Compute orthogonalized MA coefficient matrices.

plot_data([with_presample])

Plot the input time series.

plot_forecast(steps[, alpha, plot_conf_int, ...])

Plot the forecast.

predict([steps, alpha, exog_fc, exog_coint_fc])

Calculate future values of the time series.

summary([alpha])

Return a summary of the estimation results.

test_granger_causality(caused[, causing, signif])

Test for Granger-causality.

test_inst_causality(causing[, signif])

Test for instantaneous causality.

test_normality([signif])

Test assumption of normal-distributed errors using Jarque-Bera-style omnibus \(\\chi^2\) test.

test_whiteness([nlags, signif, adjusted])

Test the whiteness of the residuals using the Portmanteau test.

Properties

cov_params_default

cov_params_wo_det

cov_var_repr

Gives the covariance matrix of the corresponding VAR-representation.

fittedvalues

Return the in-sample values of endog calculated by the model.

llf

Compute the VECM's loglikelihood.

pvalues_alpha

pvalues_beta

pvalues_det_coef

pvalues_det_coef_coint

pvalues_gamma

resid

Return the difference between observed and fitted values.

stderr_alpha

stderr_beta

stderr_coint

Standard errors of beta and deterministic terms inside the cointegration relation.

stderr_det_coef

stderr_det_coef_coint

stderr_gamma

stderr_params

tvalues_alpha

tvalues_beta

tvalues_det_coef

tvalues_det_coef_coint

tvalues_gamma

var_rep


Last update: Dec 11, 2024