全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
12087 21
2011-11-09
我想问一下关于用STATA作面板脉冲响应函数的编程是怎么做的。你是怎么进行的?谢谢。
二维码

扫码加我 拉你入群

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

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

全部回复
2011-11-10 14:24:37
求高手解答啊
二维码

扫码加我 拉你入群

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

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

2011-11-11 15:56:49
it is very easy,using pvar
二维码

扫码加我 拉你入群

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

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

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"


二维码

扫码加我 拉你入群

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

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

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);
可是方差分解过程出错了。这是什么原因啊
二维码

扫码加我 拉你入群

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

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

2011-11-24 02:35:26
我按照你的举例做了。输入的命令语句是
仔细看命令
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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