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]

用于保存向量误差修正模型(VECM)相关估计结果的类。

Parameters:
endogndarray (neqs x nobs_tot)

观测数组。

exogndarray (nobs_tot x neqs) or None

协整关系外的确定性项。

exog_cointndarray (nobs_tot x neqs) or None

协整关系内的确定性项。

k_arint, >= 1

VAR 表示中的滞后。这意味着 VEC 表示中的滞后数(=滞后差分)等于 \(k_{ar} - 1\)

coint_rankint, 0 <= coint_rank <= neqs

协整秩,等于矩阵 \(\Pi\) 的秩以及 \(\alpha\)\(\beta\) 的列数。

alphandarray (neqs x coint_rank)

VECM 参数 \(\alpha\) 的估计值。

betandarray (neqs x coint_rank)

VECM 参数 \(\beta\) 的估计。

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

包含VECM(\(k_{ar}-1\))的\(k_{ar}-1\)个参数矩阵\(\Gamma_1, \dots, \Gamma_{k_{ar}-1}\)的估计值的数组。子矩阵从左到右水平堆叠。

sigma_undarray (neqs x neqs)

白噪声过程协方差矩阵的估计 \(\Sigma_u\)

deterministicstr {"n", "co", "ci", "lo", "li"}
  • "n" - 无确定性项

  • "co" - 协整关系外的常数

  • "ci" - 协整关系中的常数项

  • "lo" - 协整关系外的线性趋势

  • "li" - 协整关系内的线性趋势

这些组合是可能的(例如,"cili""colo" 用于带有截距的线性趋势)。有关更多信息,请参阅 VECM 类的文档字符串。

seasonsint, default: 0

季节性周期中的期数。0 表示没有季节性。

first_seasonint, default: 0

第一次观测的季节。

delta_y_1_Tndarray or None, default: None

用于内部计算的辅助数组。如果未作为参数提供,将会进行计算。

y_lag1ndarray or None, default: None

用于内部计算的辅助数组。如果未作为参数提供,将会进行计算。

delta_xndarray or None, default: None

用于内部计算的辅助数组。如果未作为参数提供,将会进行计算。

modelVECM

一个VECM类的实例。

nameslist of str

列表中的每个 str 代表时间序列的一个变量的名称。

datesarray_like

例如,长度为 nobs_tot 的 DatetimeIndex。

Attributes:
nobsint

观测值数量(不包括预样本)。

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

时间序列中的变量数量。

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)

协整关系中所有确定性项的估计系数。

const_cointndarray (1 x coint_rank)

如果在协整关系内部存在一个常数确定性项,那么const_cointdet_coef_coint的第一行。否则它是一个全零的ndarray。

lin_trend_cointndarray (1 x coint_rank)

如果在协整关系中存在线性确定性项,那么lin_trend_coint包含相应的估计系数。因此,它表示det_coef_coint中相应的行。如果在协整关系中不存在线性确定性项,那么lin_trend_coint是一个全零的ndarray。

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

如果在协整关系中通过exog_coint参数传递了确定性项,那么exog_coint_coefs包含相应的估计系数。因此,exog_coint_coefs表示det_coef_coint的最后一行。如果没有通过exog_coint参数传递确定性项,则此属性为None

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

估计的系数用于所有位于协整关系之外的确定性项。

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

如果在协整外的确定性常数项在确定性参数中被指定,那么constdet_coef_coint的第一列。否则它是一个大小为零的ndarray。

seasonalndarray (neqs x seasons)

如果seasons参数大于0,则seasonal包含对应于季节性项的估计系数。否则,它是一个大小为零的ndarray。

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

如果在协整关系之外指定了线性确定性项,则在确定性参数中,lin_trend包含相应的估计系数。因此,它表示det_coef_coint的相应列。如果没有协整关系之外的线性确定性项,则lin_trend是一个大小为零的ndarray。

exog_coefsndarray (neqs x exog_coefs.shape[1])

如果通过 exog 参数传递了协整关系外的确定性项,那么 exog_coefs 包含相应的估计系数。因此,exog_coefs 表示 det_coef 的最后几列。如果未通过 exog 参数传递任何确定性项,则此属性是一个大小为零的 ndarray。

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

协整秩,等于矩阵 \(\Pi\) 的秩以及 \(\alpha\)\(\beta\) 的列数。

llffloat

模型的对数似然值。

cov_paramsndarray (d x d)

参数的协方差矩阵。行数和列数 d(用于指定此参数的维度)等于 neqs * (neqs + num_det_coef_coint + neqs * (k_ar - 1) + 非协整关系外的确定性虚拟变量的数量)。对于没有确定性项的情况,此矩阵在 [1] 的第 287 页定义为 \(\Sigma_{co}\),并且它与最大似然估计量的关系可以在 [1] 的第 296 页的公式 (7.2.21) 中看到。

cov_params_wo_detndarray

参数的协方差矩阵 \(\tilde{\Pi}, \tilde{\Gamma}\) 其中 \(\tilde{\Pi} = \tilde{\alpha} \tilde{\beta'}\)。 等于 cov_params 不包括与确定性项相关的行和列。该矩阵在 [1] 的第287页上定义为 \(\Sigma_{co}\)

stderr_paramsndarray (d)

包含 \(\Pi\)\(\Gamma\) 的标准误差以及与确定性项相关的估计参数的数组。

stderr_cointndarray (neqs+num_det_coef_coint x coint_rank)

包含 \(\beta\) 的标准误差以及与协整关系内确定性项相关的估计参数的数组。

stderr_alphandarray (neqs x coint_rank)

的标准误差 \(\alpha\)

stderr_betandarray (neqs x coint_rank)

标准误差 \(\beta\)

stderr_det_coef_cointndarray (num_det_coef_coint x coint_rank)

与协整关系内确定性项相关的参数估计的标准误差。

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

标准误差 \(\Gamma_1, \ldots, \Gamma_{k_{ar}-1}\)

stderr_det_coefndarray (neqs x det. terms outside the coint. 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 参数矩阵 \(A_i\) 对应于 VAR 表示。如果返回值被赋给一个变量 A, 这些矩阵可以通过 A[i] 访问, 其中 \(i=0, \ldots, k_{ar}-1\)

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

这个矩阵在第289页被称为\(\Sigma^{co}_{\alpha}\),参考[1]。 它例如用于脉冲响应分析。

fittedvaluesndarray (nobs x neqs)

模型内生变量的预测样本内值。

residndarray (nobs x neqs)

残差。

参考文献

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

卢特克霍伊泽尔, H. 2005. 多变量时间序列分析新导论. 斯普林格出版社.

方法

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

计算正交化的MA系数矩阵。

plot_data([with_presample])

绘制输入的时间序列。

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

绘制预测图。

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

计算时间序列的未来值。

summary([alpha])

返回估计结果的摘要。

test_granger_causality(被影响[, 影响, 显著性])

格兰杰因果关系测试。

test_inst_causality(causing[, signif])

测试瞬时因果关系。

test_normality([显著性])

使用Jarque-Bera风格的卡方检验来测试正态分布误差的假设。

test_whiteness([nlags, signif, adjusted])

使用Portmanteau检验测试残差的白噪声特性。

属性

cov_params_default

cov_params_wo_det

cov_var_repr

给出相应VAR表示的协方差矩阵。

fittedvalues

返回模型计算的内样本endog值。

llf

计算VECM的对数似然值。

pvalues_alpha

pvalues_beta

pvalues_det_coef

pvalues_det_coef_coint

pvalues_gamma

resid

返回观测值与拟合值之间的差异。

stderr_alpha

stderr_beta

stderr_coint

协整关系内beta和确定性项的标准误差。

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: Oct 16, 2024