全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
2121 3
2013-07-09
之前问过关于这个东西的问题。statalist上的那个解答是错的。见https://bbs.pinggu.org/thread-2515395-1-1.html
昨晚好好做了一下。其实挺简单的。没有写一个完整的程序,只是把计算过程做出来了。供大家参考。
对于一个有5个变量的VAR(1)来说,可以是这样的:(注意需要让当前的估计是这个VAR)
复制代码

我已经验证过,当估计VAR时使用dfk选项时,这个和EViews的GIRF做出的结果是完全一样的。

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2013-7-9 19:17:57
另外,谁能顺便告诉我macro (global and local)能在mata里用吗?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-7-9 20:12:29
夏目贵志 发表于 2013-7-9 19:17
另外,谁能顺便告诉我macro (global and local)能在mata里用吗?
William Gould 在他的paper里有几段说到:

"The first rule for programming in Mata is to forget that macros even exist. Macros
are not necessary and, in fact, all your ado-file instincts will mislead you. Everything
macros do for you in ado-files is performed in Mata by Mata variables.
........
Mata does not need macros, but that does not mean you cannot work with macros in
Mata. Macros are such an important part of Stata that you will sometimes want to
access a macro’s contents or change those contents.
........."

简言之,按理mata不须要macro,
但如果您真的手痒,好吧!

help st_local
help st_global

参考就好,我mata不熟的。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-7-9 20:27:36
h3327156 发表于 2013-7-9 20:12
William Gould 在他的paper里有几段说到:

"The first rule for programming in Mata is to forget th ...
非常感谢!我可以想象比如说,用像是matlab里的multidimensional array之类的东西来代替macro用来给矩阵命名什么的,不过我最喜欢stata的地方就是macro的存在。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群