全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
2920 7
2019-09-14
悬赏 100 个论坛币 未解决
求PVAR模型的stata命令,先给100金币,其余的可以再商议。多谢!
二维码

扫码加我 拉你入群

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

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

全部回复
2019-9-14 16:50:57
复制代码
并安装 (或 net install st0455)。
二维码

扫码加我 拉你入群

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

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

2019-9-14 16:51:53
黃河泉 发表于 2019-9-14 16:50
请并安装 (或 net install st0455)。
有具体的STATA命令吗?
二维码

扫码加我 拉你入群

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

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

2019-9-14 16:52:13
二维码

扫码加我 拉你入群

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

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

2019-9-14 17:19:39
安装完pvar就有例子
看帮助就可以了



help pvar
----------------------------------------------------------------------------------------------

Title

    pvar -- Panel vector autoregressive models


Syntax

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

    options                       Description
    ----------------------------------------------------------------------------------------
    Model
      lags(#)                     use first # lags in the underlying pVAR; default is
                                    lags(1)
      exog(varlist)               use time-varying exogenous variables in varlist
      *fod                        use Helmert transformation to remove panel-specific fixed
                                    effects; the default
      *fd                         use first difference to remove panel-specific fixed
                                    effects

    Model 2
      td                          remove cross-sectional mean from each variable in
                                    depvarlist and in varlist if specified
      instlags(numlist)           specify lag orders of depvarlist to be used as instruments
      gmmstyle                    use "GMM-style" instruments; may only be used with
                                    instlags()
      gmmopts(options)            override the default GMM options

    SE/Robust
      vce(vcetype[, independent]) vcetype may be robust, cluster clustervar, bootstrap,
                                    jackknife, hac kernel lags or unadjusted; default is
                                    vce(unadjusted)

    Reporting
      overid                      report Hansen's J statistic of overidentying restrictions
      level(#)                    set confidence level; default is level(95)
      noprint                     do not display coefficient table
    ----------------------------------------------------------------------------------------
    You must xtset your data before using pvar; see [XT] xtset.


Description

    pvar fits a multivariate panel regression of each dependent variable on lags of itself
    and on lags of all other dependent variables using generalized method of moments (GMM).
    pvar also fits a variant of panel vector autoregressive models (pVAR) known as pVARX,
    which also includes exogenous explanatory variables. See [R] gmm for GMM estimation
    option details.


Options

        +-------+
    ----+ Model +---------------------------------------------------------------------------

    lags(#) specifies the maximum lag order # to be included in the model.  The default is
        to use the first lag of each variable in depvarlist.

    exog(varlist) specifies a list of exogenous variables to be included in the pVAR.

    fod specifies that the panel-specific fixed effects be removed using forward orthogonal
        deviation or Helmert transformation. By default, the first # lags of depvarlist in
        the model are instrumented by the same lags. This is the default option.

    fd specifies that the panel-specific fixed effects be removed using first difference
        instead of forward orthogonal deviations. By default, the first # lags of depvarlist
        in the model are instrumented by the #+1 to 2#+1 lags of depvarlist.

        +---------+
    ----+ Model 2 +-------------------------------------------------------------------------

    td specifies that the cross-sectional mean be removed by differencing from each series.

    instlags(numlist) overrides the default lag orders of depvarlist used as instruments in
        the model. Instead the numlist-th lags are used as instruments.

    gmmstyle specifies that "GMM-style" instruments as proposed by Holtz-Eakin, Newey and
        Rosen (1988) be used. For each instrument based on lags of depvarlist, missing
        values are substituted with zero. Observations with no valid instruments are
        excluded.

    gmmopts(options) overrides the default pvar options. Equations in the model are named
        using each variable in depvarlist. See [R] gmm for options.

        +-----------+
    ----+ SE/Robust +-----------------------------------------------------------------------

    vce(vcetype[, independent]) specifies the type of standard error reported, which
        includes types that are robust to some types of misspecification, that allow for
        intragroup correlation, and that use bootstrap or jackknife methods; see [R]
        vce_option.

        +-----------+
    ----+ Reporting +-----------------------------------------------------------------------

    overid specifies that Hansen's J statistic of overidentifying restriction be reported.
        This option is available only for over-identified systems.

    level(#); see [R] estimation_options.

    noprint suppresses printing of the coefficient table.


Remarks

    This version is in beta mode. No warranties whatsoever.


Examples

    Setup
        . webuse nlswork2
        . xtset idcode year
        . gen wage = exp(ln_wage)
   
    Fit panel vector autoregressive model with 1 lag by Helmert transformation (the default)
        . pvar wage hours

    Same as above but with standard errors clustered by industry-occupation
        . egen indocc = group(ind_code occ_code)
        . pvar wage hours, vce(cluster indocc)

    Same as first, but use the first three lags as instruments
        . pvar wage hours, instl(1/3)

    Same as above, but use "GMM-style" instruments
        . pvar wage hours, instl(1/3) gmms

    Same as above, but report over-identification test
        . pvar wage hours, instl(1/3) gmms overid

    Fit default pvar options using gmmopts(options)
        . pvar wage hours, gmmo(winitial(identity) wmatrix(robust) twostep vce(unadjusted))


Saved results

    pvar saves the following in e():

    Scalars        
      e(N)                number of observations
      e(n)                number of panels
      e(tmin)             first time period in sample
      e(tmax)             last time period in sample
      e(tbar)             average time periods among panels
      e(mlag)             maximum lag order in pVAR
      e(N_clust)          number of clusters
      e(Q)                criterion function
      e(J)                Hansen's J chi-squared statistic
      e(J_df)             J statistic degrees of freedom
      e(rank)             rank of e(V)
      e(ic)               number of iterations used by iterative GMM estimator
      e(converged)        1 if converged, 0 otherwise

    Macros         
      e(cmd)              pvar
      e(cmdline)          command as typed
      e(depvar)           names of dependent variables
      e(exog)             names of exogenous variables, if specified
      e(clustvar)         name of cluster variable
      e(instr)            instruments
      e(eqnames)          equation names
      e(timevar)          name of time variable
      e(panelvar)         name of panel variable
      e(properties)       b V

    Matrices      
      e(b)                coefficient vector
      e(V)                Variance-covariance matrix of the estimator
      e(Sigma)            Variance-covariance matrix of the model residuals
      e(W)                weight matrix used for final round of estimation
      e(init)             initial values of the estimators

    Functions      
      e(sample)           mark estimation sample


References

    Alvarez, J. and M. Arellano (2003). The time-series and cross-section asymptotics of
        dynamic panel data estimators. Econometrica, 71(4), 1121-1159.

    Holtz-Eakin, D., W. Newey and H.S. Rosen (1988). Estimating vector autoregressions with
        panel data.  Econometrica, 56(6), 1371-1395.


Also see
      Help:  pvarirf, pvarfevd, pvargranger, pvarsoc, pvarstable
二维码

扫码加我 拉你入群

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

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

2019-9-14 17:20:37
你安装好,然后看pvar的帮助里面就有命令格式和例子
help  pvar
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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