处理过程与缩减型VAR相似。我在视频中介绍了IRF的估算方法,要获得方差分解,只需简单修改IRF相关的命令即可。
help irf_create
下面,用 B6_TimeS.do 文件中第 966 行的例子予以说明:
第一步,估计 SVAR 模型:
use lutkepohl.dta, clear
mat A = (1,0,0 \ .,1,0 \ .,.,1)
mat B = (.,0,0 \ 0,.,0 \ 0,0,.)
mat list A
mat list B
svar dlinvestment dlincome dlconsumption, aeq(A) beq(B)
第二步,采用 irf create 命令创建 IRF 文件: help irf create
irf create sv01, step(10) set(myirf01) replace
第三步,采用 irf table 命令列示方差分解的结果:
irf table fevd, irf(sv01) impulse(dlincome) response(dlconsumption)
或
irf graph fevd, irf(sv01) impulse(dlincome) response(dlconsumption)
*==============
*--结果如下:
*==============
use lutkepohl.dta, clear
(Quarterly SA West German macro data, Bil DM, from Lutkepohl 1993 Table E.1)
svar dlinvestment dlincome dlconsumption, aeq(A) beq(B)
Estimating short-run parameters
结果略……
irf create sv01, step(10) set(myirf01) replace
// help irf create
(file myirf01.irf now active)
(file myirf01.irf updated)
irf table fevd, irf(sv01) impulse(dlincome) response(dlconsumption)
// help irf table
Results from sv01
+--------------------------------------------+
| | (1) (1) (1) |
| step | fevd Lower Upper |
|--------+-----------------------------------|
|0 | 0 0 0 |
|1 | .288494 .13663 .440357 |
|2 | .294288 .149797 .43878 |
|3 | .322454 .174356 .470552 |
|4 | .319227 .174066 .464389 |
|5 | .322579 .175544 .469613 |
|6 | .323552 .175826 .471277 |
|7 | .323383 .17577 .470995 |
|8 | .323499 .175744 .471253 |
|9 | .323534 .175743 .471325 |
|10 | .323531 .17574 .471322 |
+--------------------------------------------+
95% lower and upper bounds reported
(1) irfname = sv01, impulse = dlincome, and response = dlconsumption
|