楼主: 醒目KKK
6582 11

[面板数据求助] 【急求大神解答】非平衡面板数据with gap,做动态面板回归GMM估计 [推广有奖]

  • 0关注
  • 0粉丝

本科生

15%

还不是VIP/贵宾

-

威望
0
论坛币
911 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
325 点
帖子
30
精华
0
在线时间
85 小时
注册时间
2014-10-9
最后登录
2020-2-15

楼主
醒目KKK 发表于 2017-1-24 10:58:51 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
各位大神,我的数据是非平衡的,而且with gaps,请问如果做动态面板回归的话,需要对数据进行怎样的处理吗?比如消除gaps,如果要消除的话,应该怎么操作呢?
二维码

扫码加我 拉你入群

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

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

关键词:非平衡面板数据 GMM估计 非平衡面板 平衡面板 面板数据 动态 平衡

本帖被以下文库推荐

沙发
黃河泉 在职认证  发表于 2017-1-24 18:09:19
好像回答这个问题了?答案是,不用另外处理!
已有 1 人评分学术水平 热心指数 信用等级 收起 理由
日新少年 + 1 + 1 + 1 精彩帖子

总评分: 学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

藤椅
爱学习的大草莓 发表于 2017-6-8 17:56:32
黃河泉 发表于 2017-1-24 18:09
好像回答这个问题了?答案是,不用另外处理!
黄老师,您的意思是非平衡面板数据不需要对数据缺失的年份补零,或者剔除时间不连续的样本。直接利用GMM的命令回归就可以了?

板凳
黃河泉 在职认证  发表于 2017-6-9 07:08:29
爱学习的大草莓 发表于 2017-6-8 17:56
黄老师,您的意思是非平衡面板数据不需要对数据缺失的年份补零,或者剔除时间不连续的样本。直接利用GMM的 ...
是的,Stata 一般会自动帮你处理!
已有 1 人评分学术水平 热心指数 信用等级 收起 理由
日新少年 + 1 + 1 + 1 精彩帖子

总评分: 学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

报纸
爱学习的大草莓 发表于 2017-6-12 19:41:25
黃河泉 发表于 2017-6-9 07:08
是的,Stata 一般会自动帮你处理!
好的,谢谢老师~

地板
姚梦婷alice 学生认证  发表于 2019-3-23 10:25:01
黃河泉 发表于 2017-1-24 18:09
好像回答这个问题了?答案是,不用另外处理!
老师,我的面板数据需要用xtoverid进行稳健的hausman test,输入命令之后,结果说我不是随机效应,这是我的数据有问题吗?
命令如下:
xtreg cash cf1 var1 income invest debt tobinq,fe r
xtreg cash cf1 var1 income invest debt tobinq,re r
xtoverid
结果如下:
. xtreg cash cf1 var1 cscore income invest debt tobinq,fe r

Fixed-effects (within) regression               Number of obs      =       347
Group variable: fcode                           Number of groups   =        39

R-sq:  within  = 0.1411                         Obs per group: min =         2
       between = 0.0228                                        avg =       8.9
       overall = 0.0838                                        max =        11

                                                F(7,38)            =      8.02
corr(u_i, Xb)  = -0.5209                        Prob > F           =    0.0000

                                 (Std. Err. adjusted for 39 clusters in fcode)
------------------------------------------------------------------------------
             |               Robust
        cash |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         cf1 |   .2377988   .0912365     2.61   0.013     .0531001    .4224974
        var1 |    2.89622   1.105019     2.62   0.013     .6592266    5.133213
      cscore |  -.4738704    .171308    -2.77   0.009    -.8206652   -.1270756
      income |   .0991569    .039587     2.50   0.017     .0190171    .1792967
      invest |  -.5373448   .1330757    -4.04   0.000    -.8067424   -.2679472
        debt |   .2749575   .0892492     3.08   0.004     .0942819    .4556332
      tobinq |     .00792   .0055542     1.43   0.162    -.0033239    .0191638
       _cons |   .0134024   .0191342     0.70   0.488    -.0253328    .0521376
-------------+----------------------------------------------------------------
     sigma_u |  .04590076
     sigma_e |  .11581287
         rho |  .13575694   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.
end of do-file

. do "C:\Users\ADMINI~1\AppData\Local\Temp\STD01000000.tmp"

. xtreg cash cf1 var1 cscore income invest debt tobinq,re r

Random-effects GLS regression                   Number of obs      =       347
Group variable: fcode                           Number of groups   =        39

R-sq:  within  = 0.1215                         Obs per group: min =         2
       between = 0.0081                                        avg =       8.9
       overall = 0.1044                                        max =        11

                                                Wald chi2(7)       =     35.39
corr(u_i, X)   = 0 (assumed)                    Prob > chi2        =    0.0000

                                 (Std. Err. adjusted for 39 clusters in fcode)
------------------------------------------------------------------------------
             |               Robust
        cash |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         cf1 |   .2007698   .0691201     2.90   0.004     .0652969    .3362427
        var1 |   2.606168   .6899106     3.78   0.000     1.253968    3.958368
      cscore |  -.1190467   .0933034    -1.28   0.202     -.301918    .0638247
      income |   .1017463   .0381452     2.67   0.008     .0269832    .1765095
      invest |  -.2551542   .1011602    -2.52   0.012    -.4534245    -.056884
        debt |   .2380131   .0822292     2.89   0.004     .0768468    .3991794
      tobinq |   .0057896   .0051327     1.13   0.259    -.0042704    .0158496
       _cons |  -.0024139   .0157932    -0.15   0.879    -.0333681    .0285402
-------------+----------------------------------------------------------------
     sigma_u |          0
     sigma_e |  .11581287
         rho |          0   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.
end of do-file

. do "C:\Users\ADMINI~1\AppData\Local\Temp\STD01000000.tmp"

. xtoverid
Error - saved RE estimates are degenerate (sigma_u=0) and equivalent to pooled OLS
r(198);

end of do-file

r(198);

7
黃河泉 在职认证  发表于 2019-3-23 10:41:12
姚梦婷alice 发表于 2019-3-23 10:25
老师,我的面板数据需要用xtoverid进行稳健的hausman test,输入命令之后,结果说我不是随机效应,这是我的 ...
1. 的确是不太一样。3. 你用一般之 hausman test 之结果可否 show 一下? 3. 你的 CF1 是啥?

8
姚梦婷alice 学生认证  发表于 2019-3-23 11:02:03
黃河泉 发表于 2019-3-23 10:41
1. 的确是不太一样。3. 你用一般之 hausman test 之结果可否 show 一下? 3. 你的 CF1 是啥?
这是现金-现金流敏感性模型,被解释变量为cash,是现金及现金等价物增加额,,cf是经营活动现金流量净额,cf1是对cf进行中心化处理之后的值,命令为center cf,gen(cf1)
一般的hausman test仅适用于普通标准误的固定效应和随机效应检验,老师,我不采用稳健标准误可以吗?而且一般的hausman test结果还出现一个note,是说我的结果有问题吧。下面随机效应回归结果 sigma_u=0是不是说我不存在随机效应,得用混合回归啊?但是我混合回归没有F和P值。
一般的hausman test 命令如下:
xtreg cash cf1 var1 cscore income invest debt tobinq,fe
est store FE
xtreg cash cf1 var1 cscore income invest debt tobinq,re
est store RE
hausman FE RE,constant sigmamore
结果如下:
. xtreg cash cf1 var1 cscore income invest debt tobinq,fe

Fixed-effects (within) regression               Number of obs      =       347
Group variable: fcode                           Number of groups   =        39

R-sq:  within  = 0.1411                         Obs per group: min =         2
       between = 0.0228                                        avg =       8.9
       overall = 0.0838                                        max =        11

                                                F(7,301)           =      7.06
corr(u_i, Xb)  = -0.5209                        Prob > F           =    0.0000

------------------------------------------------------------------------------
        cash |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         cf1 |   .2377988   .1054167     2.26   0.025     .0303517    .4452459
        var1 |    2.89622   1.344419     2.15   0.032     .2505699     5.54187
      cscore |  -.4738704   .1867491    -2.54   0.012    -.8413696   -.1063712
      income |   .0991569   .0337253     2.94   0.004     .0327897    .1655241
      invest |  -.5373448    .150439    -3.57   0.000    -.8333903   -.2412994
        debt |   .2749575   .0841317     3.27   0.001     .1093967    .4405183
      tobinq |     .00792   .0054044     1.47   0.144    -.0027151    .0185551
       _cons |   .0134024    .020074     0.67   0.505    -.0261009    .0529056
-------------+----------------------------------------------------------------
     sigma_u |  .04590076
     sigma_e |  .11581287
         rho |  .13575694   (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0:     F(38, 301) =     0.61             Prob > F = 0.9660

. est store FE

. xtreg cash cf1 var1 cscore income invest debt tobinq,re

Random-effects GLS regression                   Number of obs      =       347
Group variable: fcode                           Number of groups   =        39

R-sq:  within  = 0.1215                         Obs per group: min =         2
       between = 0.0081                                        avg =       8.9
       overall = 0.1044                                        max =        11

                                                Wald chi2(7)       =     39.51
corr(u_i, X)   = 0 (assumed)                    Prob > chi2        =    0.0000

------------------------------------------------------------------------------
        cash |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         cf1 |   .2007698   .0819267     2.45   0.014     .0401964    .3613432
        var1 |   2.606168   .9441395     2.76   0.006     .7556885    4.456647
      cscore |  -.1190467   .1111854    -1.07   0.284    -.3369661    .0988727
      income |   .1017463   .0307477     3.31   0.001     .0414819    .1620108
      invest |  -.2551542   .1059695    -2.41   0.016    -.4628506   -.0474579
        debt |   .2380131   .0786103     3.03   0.002     .0839397    .3920866
      tobinq |   .0057896   .0041829     1.38   0.166    -.0024086    .0139878
       _cons |  -.0024139   .0157918    -0.15   0.879    -.0333652    .0285373
-------------+----------------------------------------------------------------
     sigma_u |          0
     sigma_e |  .11581287
         rho |          0   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. est store RE

. hausman FE RE,constant sigmamore

Note: the rank of the differenced variance matrix (7) does not equal the number of coefficients being tested (8); be sure this is what you
        expect, or there may be problems computing the test.  Examine the output of your estimators for anything unexpected and possibly
        consider scaling your variables so that the coefficients are on a similar scale.

                 ---- Coefficients ----
             |      (b)          (B)            (b-B)     sqrt(diag(V_b-V_B))
             |       FE           RE         Difference          S.E.
-------------+----------------------------------------------------------------
         cf1 |    .2377988     .2007698         .037029        .0625901
        var1 |     2.89622     2.606168        .2900518        .9151354
      cscore |   -.4738704    -.1190467       -.3548237        .1449022
      income |    .0991569     .1017463       -.0025894        .0119381
      invest |   -.5373448    -.2551542       -.2821906        .1020702
        debt |    .2749575     .2380131        .0369444        .0243063
      tobinq |      .00792     .0057896        .0021304        .0032312
       _cons |    .0134024    -.0024139        .0158163        .0116648
------------------------------------------------------------------------------
                           b = consistent under Ho and Ha; obtained from xtreg
            B = inconsistent under Ha, efficient under Ho; obtained from xtreg

    Test:  Ho:  difference in coefficients not systematic

                  chi2(7) = (b-B)'[(V_b-V_B)^(-1)](b-B)
                          =       15.30
                Prob>chi2 =      0.0324
                (V_b-V_B is not positive definite)

.
end of do-file

混合回归结果如下:
reg cash cf1 income invest debt tobinq i.fcode,vce(cluster fcode)

Linear regression                                      Number of obs =     347
                                                       F(  4,    38) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.1370
                                                       Root MSE      =   .1176

                                 (Std. Err. adjusted for 39 clusters in fcode)
------------------------------------------------------------------------------
             |               Robust
        cash |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         cf1 |   .2748435   .0872558     3.15   0.003     .0982035    .4514835
      income |   .1106586   .0447857     2.47   0.018     .0199947    .2013225
      invest |  -.4979956   .1391322    -3.58   0.001     -.779654   -.2163371
        debt |   .2531551   .0876024     2.89   0.006     .0758132     .430497
      tobinq |   .0125237   .0066106     1.89   0.066    -.0008588    .0259061
             |
       fcode |
        713  |  -.0141136    .011187    -1.26   0.215    -.0367605    .0085333
        735  |   .0201562    .012859     1.57   0.125    -.0058755     .046188
        798  |  -.0559216   .0069849    -8.01   0.000    -.0700617   -.0417815
        998  |  -.0126873   .0080206    -1.58   0.122    -.0289242    .0035495
       2041  |  -.0209428   .0124646    -1.68   0.101     -.046176    .0042905
       2069  |  -.0290916   .0048893    -5.95   0.000    -.0389894   -.0191938
       2086  |   .0171118   .0139415     1.23   0.227    -.0111112    .0453349
       2200  |  -.0082108   .0052188    -1.57   0.124    -.0187757    .0023541
       2234  |   .0151796   .0139296     1.09   0.283    -.0130194    .0433786
       2299  |   .0351601   .0208876     1.68   0.101    -.0071247    .0774449
       2321  |   .0348431   .0185695     1.88   0.068     -.002749    .0724352
       2458  |   .0001392   .0113741     0.01   0.990    -.0228864    .0231647
       2477  |   .0527061   .0144879     3.64   0.001     .0233769    .0820354
       2679  |   .0215856   .0087982     2.45   0.019     .0037745    .0393967
       2696  |   .0125176   .0152365     0.82   0.416     -.018327    .0433622
       2714  |    .101039   .0300434     3.36   0.002     .0402192    .1618587
       2746  |  -.0698255    .019435    -3.59   0.001    -.1091696   -.0304813
       2772  |   .0760087   .0151497     5.02   0.000     .0453396    .1066777
     300087  |   .0350502   .0073098     4.79   0.000     .0202524    .0498481
     300094  |  -.0055966   .0114693    -0.49   0.628    -.0288151    .0176219
     300106  |   .0166951   .0111684     1.49   0.143    -.0059141    .0393043
     300189  |   .0396689   .0134085     2.96   0.005     .0125247    .0668131
     300498  |  -.1177091   .0306696    -3.84   0.000    -.1797964   -.0556217
     300511  |    .053999   .0336596     1.60   0.117    -.0141412    .1221393
     600097  |    .002325   .0133311     0.17   0.862    -.0246625    .0293125
     600108  |  -.0036767   .0099159    -0.37   0.713    -.0237504     .016397
     600257  |  -.0036215   .0059437    -0.61   0.546     -.015654     .008411
     600313  |  -.0372179   .0114589    -3.25   0.002    -.0604151   -.0140206
     600354  |   .0042925   .0147613     0.29   0.773    -.0255903    .0341753
     600359  |  -.0055057    .012898    -0.43   0.672    -.0316163    .0206049
     600371  |  -.0117425   .0092677    -1.27   0.213     -.030504     .007019
     600467  |   .0016387   .0126736     0.13   0.898    -.0240176    .0272949
     600506  |  -.0752079   .0179989    -4.18   0.000    -.1116449    -.038771
     600540  |  -.0019961   .0138773    -0.14   0.886    -.0300892    .0260969
     600598  |  -.0235021   .0136335    -1.72   0.093    -.0511017    .0040975
     600965  |  -.0400433   .0064927    -6.17   0.000     -.053187   -.0268996
     600975  |  -.0340634   .0070649    -4.82   0.000    -.0483655   -.0197612
     601118  |  -.0464356   .0090965    -5.10   0.000    -.0648505   -.0280207
             |
       _cons |  -.0116483   .0258806    -0.45   0.655    -.0640409    .0407443
------------------------------------------------------------------------------

.
end of do-file

9
黃河泉 在职认证  发表于 2019-3-23 12:02:44
姚梦婷alice 发表于 2019-3-23 11:02
这是现金-现金流敏感性模型,被解释变量为cash,是现金及现金等价物增加额,,cf是经营活动现金流量净额, ...
1. 没有必要做中心化吧?2. 应该是你资料较特殊,我的建议就直接用 FE 做就好了!

10
姚梦婷alice 学生认证  发表于 2019-3-23 16:03:40
黃河泉 发表于 2019-3-23 12:02
1. 没有必要做中心化吧?2. 应该是你资料较特殊,我的建议就直接用 FE 做就好了!
谢谢老师!

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

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-1-7 03:49