全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
2174 1
2016-08-02

. use hansen1999
(The Value and Performance of U.S.Corporations (B.H.Hall & R.E.Hall, 1993))

. xthreg i q1 q2 q3 d1 qd1, rx(c1) qx(d1) thnum(1) trim(0.01)            grid(400) bs(300)
Estimating  the  threshold  parameters:   1st ......  Done
Threshold estimator (level = 95):
-----------------------------------------------------
     model |    Threshold         Lower         Upper
-----------+-----------------------------------------
      Th-1 |       0.0154        0.0141        0.0167
-----------------------------------------------------

Threshold effect test (bootstrap = 300):
-------------------------------------------------------------------------------
Threshold |       RSS        MSE      Fstat    Prob   Crit10    Crit5    Crit1
-----------+-------------------------------------------------------------------
    Single |   17.7818     0.0023      35.20  0.0000  13.0421  15.6729  21.1520
-------------------------------------------------------------------------------

Fixed-effects (within) regression               Number of obs      =      7910
Group variable: id                              Number of groups   =       565

R-sq:  within  = 0.0951                         Obs per group: min =        14
       between = 0.0692                                        avg =      14.0
       overall = 0.0660                                        max =        14

                                                F(7,7338)          =    110.21
corr(u_i, Xb)  = -0.3972                        Prob > F           =    0.0000

------------------------------------------------------------------------------
           i |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          q1 |   .0105555   .0008917    11.84   0.000     .0088075    .0123035
          q2 |  -.0202872   .0025602    -7.92   0.000     -.025306   -.0152683
          q3 |   .0010785   .0001952     5.53   0.000     .0006959    .0014612
          d1 |  -.0229482   .0042381    -5.41   0.000     -.031256   -.0146403
         qd1 |   .0007392   .0014278     0.52   0.605    -.0020597    .0035381
             |
   _cat#c.c1 |
          0  |   .0552454   .0053343    10.36   0.000     .0447885    .0657022
          1  |   .0862498   .0052022    16.58   0.000      .076052    .0964476
             |
       _cons |   .0628165   .0016957    37.05   0.000     .0594925    .0661405
-------------+----------------------------------------------------------------
     sigma_u |  .03980548
     sigma_e |  .04922656
         rho |  .39535508   (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(564, 7338) = 6.90                   Prob > F = 0.0000

. xthreg i q1 q2 q3 d1 qd1, rx(c1) qx(d1) thnum(3) trim(0.01 0.01            0.05) bs(0 300 300) thgiven
Estimating  the  threshold  parameters:   2nd ......  3rd ......  Done

Threshold estimator (level = 95):
-----------------------------------------------------
     model |    Threshold         Lower         Upper
-----------+-----------------------------------------
      Th-1 |       0.0154        0.0141        0.0167
     Th-21 |       0.0148        0.0131        0.0163
     Th-22 |       0.5364        0.5239        0.5440
      Th-3 |       0.5200        0.4554        0.5278
-----------------------------------------------------

Threshold effect test (bootstrap = 0 300 300):
-------------------------------------------------------------------------------
Threshold |       RSS        MSE      Fstat    Prob   Crit10    Crit5    Crit1
-----------+-------------------------------------------------------------------
    Single |   17.7818     0.0023      35.20  0.0000  13.0421  15.6729  21.1520
    Double |   17.7357     0.0022      20.52  0.0167  12.4046  14.4825  27.2155
    Triple |   17.7158     0.0022       8.88  0.2200  11.8294  14.6452  19.7998
-------------------------------------------------------------------------------

Fixed-effects (within) regression               Number of obs      =      7910
Group variable: id                              Number of groups   =       565

R-sq:  within  = 0.0985                         Obs per group: min =        14
       between = 0.0668                                        avg =      14.0
       overall = 0.0656                                        max =        14

                                                F(9,7336)          =     89.05
corr(u_i, Xb)  = -0.4121                        Prob > F           =    0.0000

------------------------------------------------------------------------------
           i |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          q1 |   .0103706    .000891    11.64   0.000      .008624    .0121172
          q2 |  -.0201185   .0025563    -7.87   0.000    -.0251295   -.0151075
          q3 |   .0010746   .0001949     5.51   0.000     .0006926    .0014566
          d1 |  -.0160041   .0045483    -3.52   0.000      -.02492   -.0070882
         qd1 |   .0008919   .0014256     0.63   0.532    -.0019026    .0036865
             |
   _cat#c.c1 |
          0  |   .0598482   .0053923    11.10   0.000     .0492777    .0704187
          1  |   .0917905   .0053786    17.07   0.000     .0812469    .1023341
          2  |   .1977029   .0371546     5.32   0.000     .1248692    .2705367
          3  |   .0409602   .0110755     3.70   0.000     .0192489    .0626714
             |
       _cons |   .0604252   .0017825    33.90   0.000      .056931    .0639194
-------------+----------------------------------------------------------------
     sigma_u |  .04023707
     sigma_e |  .04914178
         rho |  .40135033   (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(564, 7336) = 6.96                   Prob > F = 0.0000

.  xthreg i q1 q2 q3 d1 qd1, rx(c1) qx(d1) thnum(3) trim(0.01 0.01            0.05) grid(400) bs(300 300 300)
Estimating  the  threshold  parameters:   1st ......  2nd ......  3rd ......  Done

Threshold estimator (level = 95):
-----------------------------------------------------
     model |    Threshold         Lower         Upper
-----------+-----------------------------------------
      Th-1 |       0.0154        0.0141        0.0167
     Th-21 |       0.0154        0.0141        0.0167
     Th-22 |       0.5418        0.5268        0.5473
      Th-3 |       0.4778        0.4755        0.4823
-----------------------------------------------------

Threshold effect test (bootstrap = 300 300 300):
-------------------------------------------------------------------------------
Threshold |       RSS        MSE      Fstat    Prob   Crit10    Crit5    Crit1
-----------+-------------------------------------------------------------------
    Single |   17.7818     0.0023      35.20  0.0000  11.8091  15.7084  23.2124
    Double |   17.7258     0.0022      24.97  0.0100  12.1526  15.0158  23.0159
    Triple |   17.7119     0.0022       6.20  0.5300  14.8758  18.5197  34.4336
-------------------------------------------------------------------------------

Fixed-effects (within) regression               Number of obs      =      7910
Group variable: id                              Number of groups   =       565

R-sq:  within  = 0.0987                         Obs per group: min =        14
       between = 0.0684                                        avg =      14.0
       overall = 0.0667                                        max =        14

                                                F(9,7336)          =     89.26
corr(u_i, Xb)  = -0.4072                        Prob > F           =    0.0000

------------------------------------------------------------------------------
           i |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          q1 |   .0103968   .0008909    11.67   0.000     .0086503    .0121432
          q2 |  -.0201183   .0025559    -7.87   0.000    -.0251286   -.0151081
          q3 |   .0010734   .0001949     5.51   0.000     .0006915    .0014554
          d1 |  -.0166801   .0045804    -3.64   0.000    -.0256589   -.0077012
         qd1 |   .0008845   .0014255     0.62   0.535    -.0019099    .0036788
             |
   _cat#c.c1 |
          0  |   .0587984   .0053924    10.90   0.000     .0482278     .069369
          1  |   .0920255   .0053928    17.06   0.000     .0814541    .1025969
          2  |   .1325752   .0173155     7.66   0.000     .0986318    .1665186
          3  |   .0419859   .0112319     3.74   0.000     .0199681    .0640037
             |
       _cons |   .0604649   .0017873    33.83   0.000     .0569613    .0639684
-------------+----------------------------------------------------------------
     sigma_u |   .0400859
     sigma_e |  .04913619
         rho |  .39959759   (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(564, 7336) = 6.94                   Prob > F = 0.0000

.
.
. xthreg i q1 q2 q3 d1 qd1, rx(c1) qx(d1) thnum(3) trim(0.01 0.01            0.05) bs(300 300 300)
Estimating  the  threshold  parameters:   1st ......  2nd ......  3rd ......  Done
Threshold estimator (level = 95):
-----------------------------------------------------
     model |    Threshold         Lower         Upper
-----------+-----------------------------------------
      Th-1 |       0.0163        0.0136        0.0181
     Th-21 |       0.0148        0.0131        0.0163
     Th-22 |       0.5364        0.5239        0.5440
      Th-3 |       0.5200        0.4554        0.5278
-----------------------------------------------------

Threshold effect test (bootstrap = 300 300 300):
-------------------------------------------------------------------------------
Threshold |       RSS        MSE      Fstat    Prob   Crit10    Crit5    Crit1
-----------+-------------------------------------------------------------------
    Single |   17.7900     0.0023      31.57  0.0000  12.6567  15.0160  22.7659
    Double |   17.7357     0.0022      24.14  0.0000  10.8382  14.7167  18.7189
    Triple |   17.7158     0.0022       8.88  0.2500  12.5073  15.8665  27.3023
-------------------------------------------------------------------------------

Fixed-effects (within) regression               Number of obs      =      7910
Group variable: id                              Number of groups   =       565

R-sq:  within  = 0.0985                         Obs per group: min =        14
       between = 0.0668                                        avg =      14.0
       overall = 0.0656                                        max =        14

                                                F(9,7336)          =     89.05
corr(u_i, Xb)  = -0.4121                        Prob > F           =    0.0000

------------------------------------------------------------------------------
           i |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          q1 |   .0103706    .000891    11.64   0.000      .008624    .0121172
          q2 |  -.0201185   .0025563    -7.87   0.000    -.0251295   -.0151075
          q3 |   .0010746   .0001949     5.51   0.000     .0006926    .0014566
          d1 |  -.0160041   .0045483    -3.52   0.000      -.02492   -.0070882
         qd1 |   .0008919   .0014256     0.63   0.532    -.0019026    .0036865
             |
   _cat#c.c1 |
          0  |   .0598482   .0053923    11.10   0.000     .0492777    .0704187
          1  |   .0917905   .0053786    17.07   0.000     .0812469    .1023341
          2  |   .1977029   .0371546     5.32   0.000     .1248692    .2705367
          3  |   .0409602   .0110755     3.70   0.000     .0192489    .0626714
             |
       _cons |   .0604252   .0017825    33.90   0.000      .056931    .0639194
-------------+----------------------------------------------------------------
     sigma_u |  .04023707
     sigma_e |  .04914178
         rho |  .40135033   (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(564, 7336) = 6.96                   Prob > F = 0.0000




附件列表
Graph.png

原图尺寸 38.56 KB

Graph.png

二维码

扫码加我 拉你入群

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

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

全部回复
2024-3-20 20:38:53
这个 stata 命令(ado 文件),是 南开大学,王群勇教授写的。
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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