在R中使用VECM进行格兰杰因果关系检验 [英] Granger causality test using VECM in R

查看:950
本文介绍了在R中使用VECM进行格兰杰因果关系检验的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用R中的矢量错误校正模型(VECM)计算Granger因果关系检验.我使用 tsDyn 包计算了R中的VECM.由于我有 I (1)和协整变量,因此假定VECM实施Granger因果关系检验.但是我没有在R中找到任何可以对VECM执行Granger Granger因果关系测试的函数.我想问你,是否有人知道这样的功能.这是我的示例:

I am trying to compute the Granger causality test using the Vector Error Correction Model (VECM) in R. I calculated the VECM in R using tsDyn package. Since I have I(1) and cointegrated variables, VECM is assumed to implement the Granger causality test. However I didn't find any function in R, that could perform the Granger Granger causality test for VECM. I would like to ask You, whether someone does know such a function. Here is my example:

dols.est <- dynlm(ts_ln.API.real.1~ts_MR.var.nom.1+L(d(ts_MR.var.nom.1), -3:3)) # Estimate θ with DOLS

est.theta <- dols.est$coefficients[2]

int.mts <- ts.union(ts_ln.API.real.1, ts_MR.var.nom.1) # Create a multivariate time series

VEC.est <- VECM(int.mts, lag=1, r=1, include = c("both"), beta = est. theta)

任何帮助将不胜感激. 预先谢谢您!

Any help will be greatly appreciated. Thank You in advance!

推荐答案

您可以使用Toda-Yamamoto方法 R的Toda-Yamamoto实现.

You can use the Toda-Yamamoto approach Toda-Yamamoto implementation in R.

这篇关于在R中使用VECM进行格兰杰因果关系检验的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆