楼主: yanjiuzhuanyong
12222 21

STATA作面板脉冲响应函数的编程是怎么做的 [推广有奖]

  • 3关注
  • 2粉丝

博士生

2%

还不是VIP/贵宾

-

威望
0
论坛币
27803 个
通用积分
0.8500
学术水平
0 点
热心指数
2 点
信用等级
0 点
经验
1148 点
帖子
49
精华
0
在线时间
398 小时
注册时间
2009-11-12
最后登录
2022-9-5

楼主
yanjiuzhuanyong 发表于 2011-11-9 21:48:26 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
我想问一下关于用STATA作面板脉冲响应函数的编程是怎么做的。你是怎么进行的?谢谢。
二维码

扫码加我 拉你入群

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

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

关键词:脉冲响应函数 Stata 响应函数 tata 脉冲响应 编程 面板

已有 1 人评分经验 收起 理由
葫芦娃大王 + 10 精彩帖子

总评分: 经验 + 10   查看全部评分

沙发
yanjiuzhuanyong 发表于 2011-11-10 14:24:37
求高手解答啊

藤椅
lihoujian 发表于 2011-11-11 15:56:49
it is very easy,using pvar
已有 1 人评分经验 收起 理由
葫芦娃大王 + 10 精彩帖子

总评分: 经验 + 10   查看全部评分

懂得放弃才会拥有

板凳
lihoujian 发表于 2011-11-11 15:57:22
Title

    [XT] pvar --   Panel Vector Autoregressive Models



Syntax

        pvar depvarlist [if] [in][, gmm options]


    options               description
    -------------------------------------------------------------------------
    Model

      gmm                 estimates the model coefficients using gmm
                            (required option; ust be specified as the first
                            option); gmm calls sgmm.ado; if not specified,
                            estimates from the previous run are taken from
                            the memory

      lag(numlist)        specifies the number of lags in the underlying VAR;
                            default is 1; numlist has to be integer >0

      impulse             generates numerical impulse-responses without error
                            bands

      list_imp            generates a table with impulse-responses (use after
                            impulse)

      gr_imp              generates graphical impulse-responses (witout error
                            bands)

      monte [#]           generates error bands for impulse-responses using
                            monte-carlo simulations; # is the desired number
                            of repetitions, default 200; if using monte[#]
                            for standard errors - no need specify impulse


      list_mon            lists a table containing impulse-responses and
                            standard errors (use after monte)

      decomp [#]          generates a table containing
                            variance-decompositions; # is the max. number of
                            periods, default is 20; to use different number,
                            use double quotes (e.g. "decomp 30"); note that
                            decomp prints only every 10th

    -------------------------------------------------------------------------
    You must tsset or xtset your data before using pvar, see help tsset or
      xtset.  depvarlist may contain time series operators. See depvarlist.

Description

    pvar will estimate a PVAR model as described in Holtz et al. (1988). The
    data has to be helmert transformed prior to estimation in order to remove
    the fixed effects (see help helm).  It is recommended that the original
    variables should be time-demeaned before using helm. The model uses
    untransformed variables as instruments for the helmert-transformed
    variables in the model.  In case one wants to estimate the model using a
    different transformation (e.g. first differences), the easiest way is to
    name the transformed variables h_y1 h_y2 ... To estimate the model
    without fixed effects, create a copies of the original var amed h_y1
    h_y2... The program will use the original variables as both, regressors
    and instruments (i.e. system OLS without a constant).

    depvarlist is the list with variable names in the desired order.
    Different orderings will yield different responses. Note that when using
    monte the maximum number of variables in depvarlist is 6.
  

Examples

        . webuse grunfeld, clear

        . rename company id

        . xtset id year

        . helm invest mvalue kstock

        . pvar kstock invest mvalue, lag(3) gmm monte 500 "decomp 30"


懂得放弃才会拥有

报纸
yanjiuzhuanyong 发表于 2011-11-21 21:29:16
yanjiuzhuanyong 发表于 2011-11-10 14:24
求高手解答啊
我按照你的举例做了。输入的命令语句是
do "D:\STATA10.0\STATA12\ado\pvar ado\helm.ado"
helm  lgdp lgas lwat lsol
do "D:\STATA10.0\STATA12\ado\pvar ado\sgmm.ado"
do "D:\STATA10.0\STATA12\ado\pvar ado\pvar.ado"
pvar lgdp lgas lwat lsol, lag(3) gmm impulse monte 500 decomp (30)

结果如下:
EQ4: dep.var     : h_lsol

                b_GMM      se_GMM       t_GMM
L.h_lgdp   3.9695476   15.922736    .2493006
L.h_lgas  -.09543221   3.5528788  -.02686053
L.h_lwat  -5.2097231   10.500155  -.49615679
L.h_lsol    .6868798   .84242814   .81535714
L2.h_lgdp  -6.4409787    12.80624  -.50295626
L2.h_lgas  -.08231549    1.396539  -.05894249
L2.h_lwat   .49566873   .91860096   .53959091
L2.h_lsol   .06681118   .27231929   .24534134
L3.h_lgdp   2.0366808    6.710735   .30349593
L3.h_lgas   1.1098599   1.7580756   .63129249
L3.h_lwat   .93265486   2.1570344   .43237829
L3.h_lsol   .10942538   .23102298   .47365583
------------------------------------------------------------------------------
just identified - Hansen statistic is not calculated

symmetric uu[4,4]
            lgdp        lgas        lwat        lsol
lgdp   .00308961
lgas   .00370542   .01968829
lwat  -.01209903  -.01168149   .06451569
lsol  -.03189763  -.03849891   .10785298   1.2107535

Residuals correlation matrix

             |       u1       u2       u3       u4
-------------+------------------------------------
          u1 |   1.0000
             |
             |
          u2 |   0.4749   1.0000
             |   0.0000
             |
          u3 |  -0.8584  -0.3308   1.0000
             |   0.0000   0.0000
             |
          u4 |  -0.5219  -0.2500   0.3864   1.0000
             |   0.0000   0.0001   0.0000
             |

GMM finished : 21:25:52

Starting Monte-Carlo loop : 21:25:53 , total 500 repetitions requested
matrix not symmetric
r(505);
可是方差分解过程出错了。这是什么原因啊

地板
lihoujian 发表于 2011-11-24 02:35:26
我按照你的举例做了。输入的命令语句是
仔细看命令
懂得放弃才会拥有

7
yanjiuzhuanyong 发表于 2011-11-24 13:51:13
lihoujian 发表于 2011-11-24 02:35
仔细看命令
还是不懂呢。不知道错在哪里。请您指教一下。

8
yanjiuzhuanyong 发表于 2011-11-24 14:11:58
lihoujian 发表于 2011-11-24 02:35
仔细看命令
原始数据是可以做出方差分解的,但是如果将原始数据取对数之后就做不出方差分解。。就出现这样的语句。。Starting Monte-Carlo loop : 21:25:53 , total 500 repetitions requested
matrix not symmetric
r(505);
这是什么原因。求指教。万分感谢

9
yaopenghhxxttxs 学生认证  发表于 2012-3-19 13:57:42
太牛了

10
317792209 在职认证  学生认证  发表于 2012-4-23 14:16:50
学习一下
按时毕业,按时睡觉。多发论文,多赚点钱。

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-31 19:03