我正在使用 Bernhard Pfaff 的包 {urca} 和 {vars} 来分析 3 个时间序列。每个都是 I(1) 并且与协整关系协整。
vec2var () 命令应该将ca.jo对象(我的 VECM)转换为它的 VAR 表示形式。但是我不明白vec2var () 的输出,也不明白如何对此输出执行 VAR 分析(即,将数据发送到VAR () 函数以获取varest对象)。
也就是说,在从 VECM 转换为 VAR 之后,我向VAR () 函数(执行标准 VAR 估计)发送什么?应该是:
var.form$A%*%var.form$datamat[ , c(6:11)] + var.form$deterministic%*%var.form$datamat[ , c(4:5)]
上面代码中的维度是因为我有变量、滞后、常数项和确定性趋势。
但是vec2var () [基于上面的 R 代码] 的公式类似于 即具有确定性时间趋势和常数的基本 VAR(2)。
但这就是我感到困惑的地方:长期 VECM 的 VAR 形式(等式 4.8a,在 Pfaff 的使用 R. userR 对集成和协集成时间序列的分析中!以及其他地方,例如Lütkepohl eq'n 7.1。 1) 是:
为了获得正确的 VAR 级别表示,我是否必须从vec2var () 获取数据并自己操作它?(即找到差异序列,然后乘以适当的协整矩阵)?如果是这种情况,那么[请在 R 代码中!] 系数矩阵应该乘以哪个向量?
我觉得理论和数学形式主义以及这些 R 包之间存在脱节......但更有可能我错过了一些非常基本的东西。
这是基本的 R 代码设置:
library(urca)
library(vars)
vecm <- ca.jo(mydata, ecdet = "trend", type = "trace", spec = "longrun")
var.form <- vec2var(vecm, r= 2)
# The output data I get can be seen from names(var.form), but the key parts are:
var.form$y # my original data
var.form$datamat # original data organized with the three variables (starting at t = 2), the constant term, trend term and then six columns with two lagged levels at t=1 and t=0.
# the coefficients for the regressors on the endogenous variables (A) and deterministic components are:
var.form$A # lagged variable coefficients (levels only, I think)
var.form$deterministic # constant and time trend coefficients