楼主: shwap
2913 1

[面板数据求助] 直接代码和结果贴出来给大家看看 [推广有奖]

  • 0关注
  • 0粉丝

大专生

60%

还不是VIP/贵宾

-

威望
0
论坛币
4 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
366 点
帖子
27
精华
0
在线时间
79 小时
注册时间
2013-6-29
最后登录
2015-6-15

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
(1)tsset province year
(2)xtdes
(3)xi: xtreg lnincome lnmarket lngdpper lnpunished lnarea i.account,fe vce(cluster province)

i.account         _Iaccount_0-1       (naturally coded; _Iaccount_0 omitted)

Fixed-effects (within) regression               Number of obs      =       396
Group variable: province                        Number of groups   =        31

R-sq:  within  = 0.9110                         Obs per group: min =         7
       between = 0.8149                                        avg =      12.8
       overall = 0.8514                                        max =        13

                                                F(5,30)            =    393.27
corr(u_i, Xb)  = 0.0099                         Prob > F           =    0.0000

                              (Std. Err. adjusted for 31 clusters in province)
------------------------------------------------------------------------------
             |               Robust
    lnincome |      Coef.         Std. Err.         t       P>|t|      [95% Conf. Interval]
-------------+----------------------------------------------------------------
    lnmarket |    .482041     .1143536     4.22     0.000     .2484999    .7155822
    lngdpper |    1.501299   .1172979    12.80    0.000     1.261744    1.740853
  lnpunished |   .0692428    .0912037    0.76     0.454      -.11702      .2555055
      lnarea |      .7239415    .0765667    9.46     0.000     .5675715    .8803116
_Iaccount_     .0811348    .1072505    0.76     0.455    -.1378999    .3001696
       _cons |     -5.88166     1.000968   -5.88    0.000     -7.92591     -3.83741
-------------+----------------------------------------------------------------
     sigma_u |  .64345609
     sigma_e |  .43293424
         rho |  .68837558   (fraction of variance due to u_i)
------------------------------------------------------------------------------

(4) xi: xtreg lnincome lnmarket lngdpper lnpunished lnarea i.account,re vce(cluster province)
i.account         _Iaccount_0-1       (naturally coded; _Iaccount_0 omitted)
Random-effects GLS regression                   Number of obs      =       396
Group variable: province                        Number of groups   =        31


R-sq:  within  = 0.9089                         Obs per group: min =         7
       between = 0.8664                                        avg =      12.8
       overall = 0.8770                                        max =        13


                                                Wald chi2(5)       =   1793.44
corr(u_i, X)   = 0 (assumed)                    Prob > chi2        =    0.0000


                              (Std. Err. adjusted for 31 clusters in province)
------------------------------------------------------------------------------
             |               Robust
    lnincome |      Coef.         Std. Err.         z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    lnmarket |     .5227059    .110567      4.73    0.000     .3059985    .7394132
    lngdpper |     1.230361   .0949567    12.96   0.000     1.044249    1.416472
  lnpunished |    .0363822    .0884557    0.41    0.681    -.1369877    .2097521
      lnarea |       .8388615    .0678176    12.37   0.000     .7059414    .9717816
_Iaccount_1 |  .1778101    .0981268    1.81    0.070    -.0145148     .370135
       _cons |      -4.262785   .9419984    -4.53   0.000    -6.109068   -2.416502
-------------+----------------------------------------------------------------
     sigma_u |  .37477717
     sigma_e |  .43293424
         rho |  .42836907   (fraction of variance due to u_i)
------------------------------------------------------------------------------
(5)estat ovtest

Ramsey RESET test using powers of the fitted values of lnincome
       Ho:  model has no omitted variables
                 F(3, 387) =      4.44
                  Prob > F =      0.0044

(6)estat hettest

Breusch-Pagan / Cook-Weisberg test for heteroskedasticity
         Ho: Constant variance
         Variables: fitted values of lnincome

         chi2(1)      =    12.36
         Prob > chi2  =   0.0004
(7)qui xi: xtreg lnincome lnmarket lngdpper lnpunished lnarea i.account,fe
(8)est store fe
(9)qui xi: xtreg lnincome lnmarket lngdpper lnpunished lnarea i.account,re
(10)est store re
(11)hausman fe re,constant sigmamore


                 ---- Coefficients ----
             |              (b)                (B)                  (b-B)           sqrt(diag(V_b-V_B))
             |               fe                  re              Difference                S.E.
-------------+----------------------------------------------------------------
    lnmarket |      .482041       .5227059       -.0406649         .02831
    lngdpper |    1.501299      1.230361        .2709379          .066832
  lnpunished |     .0692428     .0363822        .0328606         .0112915
      lnarea |        .7239415     .8388615        -.11492            .0244186
_Iaccount_1 |   .0811348     .1778101       -.0966753         .032294
       _cons |      -5.88166     -4.262785        -1.618875         .5430612
------------------------------------------------------------------------------
                           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(6) = (b-B)'[(V_b-V_B)^(-1)](b-B)
                          =       38.32
                Prob>chi2 =      0.0000
                (V_b-V_B is not positive definite)
(去掉 constant 和sigmamore ,chi2值就为负的了)


(12)xi: xtgls lnincome lnmarket lngdpper lnpunished lnarea i.account,panels (hetero)
i.account         _Iaccount_0-1       (naturally coded; _Iaccount_0 omitted)
Cross-sectional time-series FGLS regression
Coefficients:  generalized least squares
Panels:        heteroskedastic
Correlation:   no autocorrelation
Estimated covariances      =        31          Number of obs      =       396
Estimated autocorrelations =         0          Number of groups   =        31
Estimated coefficients     =         6          Obs per group: min =         7
                                                               avg =  12.77419
                                                               max =        13
                                                Wald chi2(5)       =   7510.71
                                                Prob > chi2        =    0.0000


------------------------------------------------------------------------------
    lnincome |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    lnmarket |   .4584226     .0540707     8.48      0.000     .352446    .5643991
    lngdpper |   .8573275     .0483444    17.73    0.000     .7625742    .9520808
  lnpunished |  -.1886504    .042592      -4.43     0.000    -.2721291   -.1051716
      lnarea |      1.000523     .0247193    40.48    0.000     .9520746    1.048972
_Iaccount_1 |   .2667665   .0550432    4.85     0.000     .1588839    .3746491
       _cons |    -2.265709     .3943075    -5.75    0.000    -3.038538   -1.492881
------------------------------------------------------------------------------



欢迎大牛们指出其中的问题和改进的建议,谢谢。





二维码

扫码加我 拉你入群

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

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

关键词:coefficients fixed-effect correlations coefficient correlation naturally between overall groups within

沙发
shwap 发表于 2014-4-15 19:36:26 |只看作者 |坛友微信交流群
没人发表意见么

使用道具

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

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-5-18 00:43