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:
endog : ndarray (neqs x nobs_tot)

Array of observations.

exog

Deterministic terms outside the cointegration relation.

exog_coint

Deterministic terms inside the cointegration relation.

k_ar : int, >= 1

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

coint_rank

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

alpha

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

beta

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

gamma : ndarray (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_u : ndarray (neqs x neqs)

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

deterministic='n'

  • "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.

seasons : int, default: 0

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

first_season : int, default: 0

Season of the first observation.

delta_y_1_T=None

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

y_lag1=None

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

delta_x=None

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

model=None

An instance of the VECM-class.

names : list of str

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

dates : array_like

For example a DatetimeIndex of length nobs_tot.

nobs

Number of observations (excluding the presample).

Type:

int

model
Type:

see Parameters

y_all
Type:

see endog in Parameters

exog
Type:

see Parameters

exog_coint
Type:

see Parameters

names
Type:

see Parameters

dates
Type:

see Parameters

neqs

Number of variables in the time series.

Type:

int

k_ar
Type:

see Parameters

deterministic
Type:

see Parameters

seasons
Type:

see Parameters

first_season
Type:

see Parameters

alpha
Type:

see Parameters

beta
Type:

see Parameters

gamma
Type:

see Parameters

sigma_u
Type:

see Parameters

det_coef_coint

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

Type:

ndarray (#(determinist. terms inside the coint. rel.) x coint_rank)

const_coint

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.

Type:

ndarray (1 x coint_rank)

lin_trend_coint

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.

Type:

ndarray (1 x coint_rank)

exog_coint_coefs

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.

Type:

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

det_coef

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

Type:

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

const

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.

Type:

ndarray (neqs x 1) or (neqs x 0)

seasonal

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.

Type:

ndarray (neqs x seasons)

lin_trend

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.

Type:

ndarray (neqs x 1) or (neqs x 0)

exog_coefs

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.

Type:

ndarray (neqs x exog_coefs.shape[1])

_delta_y_1_T
Type:

see delta_y_1_T in Parameters

_y_lag1
Type:

see y_lag1 in Parameters

_delta_x
Type:

see delta_x in Parameters

coint_rank

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

Type:

int

llf

The model’s log-likelihood.

Type:

float

cov_params

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].

Type:

ndarray (d x d)

cov_params_wo_det

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].

Type:

ndarray

stderr_params

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

Type:

ndarray (d)

stderr_coint

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

Type:

ndarray (neqs+num_det_coef_coint x coint_rank)

stderr_alpha

The standard errors of \(\alpha\).

Type:

ndarray (neqs x coint_rank)

stderr_beta

The standard errors of \(\beta\).

Type:

ndarray (neqs x coint_rank)

stderr_det_coef_coint

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

Type:

ndarray (num_det_coef_coint x coint_rank)

stderr_gamma

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

Type:

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

stderr_det_coef

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

Type:

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

tvalues_alpha
Type:

ndarray (neqs x coint_rank)

tvalues_beta
Type:

ndarray (neqs x coint_rank)

tvalues_det_coef_coint
Type:

ndarray (num_det_coef_coint x coint_rank)

tvalues_gamma
Type:

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

tvalues_det_coef
Type:

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

pvalues_alpha
Type:

ndarray (neqs x coint_rank)

pvalues_beta
Type:

ndarray (neqs x coint_rank)

pvalues_det_coef_coint
Type:

ndarray (num_det_coef_coint x coint_rank)

pvalues_gamma
Type:

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

pvalues_det_coef
Type:

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

var_rep

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\).

Type:

(k_ar x neqs x neqs)

cov_var_repr

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

Type:

ndarray (neqs**2 * k_ar x neqs**2 * k_ar)

fittedvalues

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

Type:

ndarray (nobs x neqs)

resid

The residuals.

Type:

ndarray (nobs x neqs)

References

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