全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
2799 2
2017-03-12
求助stata大神关于在stata中运行pvar的问题,我现在用的是love博士2015年8月的pvar.ado文件,简单操作panel var没问题,我看help文件后想尝试td参数(对截面差异进行处理),加了td参数后有运行结果,只是运行完后显示
Instruments : l(1).(NCPSDR LR RGDPIR STCF1)
invalid syntax
r(198);

不知道问题出在哪里?
另外,我在看help文件的时候,没看懂pvar有几组model的option设置,这些参数可以放在一个模型中用吗?例如exog和td能放在一个模型中用吗?
附上pvar的help文件:

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.




二维码

扫码加我 拉你入群

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

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

全部回复
2017-8-9 09:14:58
同问,我加入td后也出现了invalid syntax的提示。。
请问楼主怎么解决的?
二维码

扫码加我 拉你入群

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

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

2021-5-18 11:31:13
加入td后,pvarg估计结果中好多0(omitted),是怎么回事?
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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