用MATLAB怎么做格兰杰因果关系检验

用MATLAB怎么做格兰杰因果关系检验,第1张

第一步:选定两序列,以group打开(点右高册好键,选open as group)得d出窗如图:

第二步:选菜单姿贺view,点选最后一项granger causalty test....得d出窗,戚铅输入阶数,一般2或3即可,点OK,得结果。

Stata好像还没有出具体的包裹针对panle data做格兰杰检验,这个检验本来是针对time series。

但是理论倒是出了,请参见: Christophe Hurlin and Baptiste Venet:Granger Causality Tests in Panel Data Models with Fixed Coefficients

沿着这个思路,可以再Matlab或肆孝者其他编程软件里,自己或找人实现。

另外,Stata论坛里Kit Baum给了一些不完整的答复:

Q: granger x y,lag(2) However, I receive an error message saying

"repeated time values in sample". Therefore, I had to collapse the data

to achieve 1 observation for each year. Is there any way that I can

utilize my whole data to do causality test?

Sarah

A: Please see my recent posts on the use of DW statistic in panel. This

is the same problem. The granger[-sims] test is a time series

regression. One can run it separately for each unit of the panel, but

how should you combine the results? Average the test statistics over

unit, like some panel unit root tests? To test for causality using an

entire panel, you must have a statistic that is designed for panel data.

Kit

所以,你对每或野个unit做格兰杰检验: webuse grunfeld gcause2 invest mvalue if company==4, lag(4) 对其他的company再做裂团稿一遍,average。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/12558236.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-26
下一篇 2023-05-26

发表评论

登录后才能评论

评论列表(0条)

保存