Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Anara:
    with -o.- prefix Stata labels the omitted variables (again as per -fvvarlist- notation).
    As the community-contributed module -xtoverid- does not support -fvvarlist- notation, you should remove the omitted variable manually before -xi:xtreg-, which is oftentimes unfeasible (see https://www.statalist.org/forums/for...ctor-variables).
    Another option is to use the community-contributed module -rhausman- (just type -search rhausman- to spot and install it). A careful reading of the -helpfile- is warmly recommended.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #17
      Dear Carlo Lazzaro, thank you very much! I have followed your advice and have the results below. Based on these results, I can reject the null hypothesis and conclude that the difference in coefficients is systematic. My further questions are:

      1) Does that mean I need to use the FE method?
      2) if I use FE method, then my coefficients are insignificant and within R squared is very low. Hence, I would still prefer to use RE - but how can I justify this method?

      Code:
       xi: xtreg wages i.high_qual training_hrs i.illness_disability i.sex i.children i.general_health i.region i.age i.sector, fe vce(cluster id)
      i.high_qual       _Ihigh_qual_1-9     (naturally coded; _Ihigh_qual_1 omitted)
      i.illness_dis~y   _Iillness_d_1-2     (naturally coded; _Iillness_d_1 omitted)
      i.sex             _Isex_1-2           (naturally coded; _Isex_1 omitted)
      i.children        _Ichildren_0-9      (naturally coded; _Ichildren_0 omitted)
      i.general_hea~h   _Igeneral_h_1-5     (naturally coded; _Igeneral_h_1 omitted)
      i.region          _Iregion_1-12       (naturally coded; _Iregion_1 omitted)
      i.age             _Iage_1-13          (naturally coded; _Iage_1 omitted)
      i.sector          _Isector_1-6        (naturally coded; _Isector_1 omitted)
      note: _Ichildren_7 omitted because of collinearity.
      note: _Ichildren_8 omitted because of collinearity.
      note: _Ichildren_9 omitted because of collinearity.
      note: _Iage_13 omitted because of collinearity.
      
      Fixed-effects (within) regression               Number of obs     =     81,014
      Group variable: id                              Number of groups  =     45,174
      
      R-squared:                                      Obs per group:
           Within  = 0.0136                                         min =          1
           Between = 0.0765                                         avg =        1.8
           Overall = 0.0675                                         max =          4
      
                                                      F(43,45173)       =       8.35
      corr(u_i, Xb) = -0.0383                         Prob > F          =     0.0000
      
                                       (Std. err. adjusted for 45,174 clusters in id)
      -------------------------------------------------------------------------------
                    |               Robust
              wages | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
      --------------+----------------------------------------------------------------
      _Ihigh_qual_2 |  -.0928267   .4878194    -0.19   0.849    -1.048961    .8633073
      _Ihigh_qual_3 |   .0182819   .4739264     0.04   0.969    -.9106216    .9471855
      _Ihigh_qual_4 |  -.3006534   .5087657    -0.59   0.555    -1.297843    .6965358
      _Ihigh_qual_5 |  -.9605771   .8286214    -1.16   0.246    -2.584689    .6635345
      _Ihigh_qual_9 |  -2.879779   1.579244    -1.82   0.068    -5.975123    .2155652
       training_hrs |  -.0000712   .0003713    -0.19   0.848     -.000799    .0006565
      _Iillness_d_2 |  -.0778907   .0980436    -0.79   0.427    -.2700578    .1142764
            _Isex_2 |   .4485456   .9889555     0.45   0.650    -1.489823    2.386915
       _Ichildren_1 |   .1282714   .1623024     0.79   0.429     -.189844    .4463868
       _Ichildren_2 |   .4622015   .2571597     1.80   0.072    -.0418358    .9662387
       _Ichildren_3 |   .0442143   .4275736     0.10   0.918     -.793837    .8822657
       _Ichildren_4 |  -.2602339   .5770774    -0.45   0.652    -1.391315    .8708473
       _Ichildren_5 |  -1.442031    .894718    -1.61   0.107    -3.195693    .3116315
       _Ichildren_6 |  -5.016402   2.648055    -1.89   0.058    -10.20663    .1738293
       _Ichildren_7 |          0  (omitted)
       _Ichildren_8 |          0  (omitted)
       _Ichildren_9 |          0  (omitted)
      _Igeneral_h_2 |  -.0055532   .1005277    -0.06   0.956    -.2025892    .1914829
      _Igeneral_h_5 |  -.2084222   .2590116    -0.80   0.421    -.7160891    .2992447
         _Iregion_2 |  -.5530689   1.105571    -0.50   0.617    -2.720007    1.613869
         _Iregion_3 |  -2.145961   1.471623    -1.46   0.145    -5.030366    .7384442
         _Iregion_4 |   2.999986   1.518045     1.98   0.048     .0245931     5.97538
         _Iregion_5 |   4.373938   2.578813     1.70   0.090    -.6805784    9.428454
         _Iregion_6 |   1.498337   1.315262     1.14   0.255    -1.079598    4.076272
         _Iregion_7 |   1.065125   1.336014     0.80   0.425    -1.553485    3.683735
         _Iregion_8 |   1.369021     1.2658     1.08   0.279    -1.111968    3.850011
         _Iregion_9 |    .552194   1.489462     0.37   0.711    -2.367177    3.471565
        _Iregion_10 |    1.09009    1.68681     0.65   0.518    -2.216086    4.396266
        _Iregion_11 |    .915629   1.357109     0.67   0.500    -1.744326    3.575584
        _Iregion_12 |  -3.344014   2.193299    -1.52   0.127    -7.642917    .9548891
            _Iage_2 |  -4.311408   .8668409    -4.97   0.000     -6.01043   -2.612385
            _Iage_3 |  -3.699976   .7820146    -4.73   0.000    -5.232737   -2.167214
            _Iage_4 |  -2.570877   .7070325    -3.64   0.000    -3.956673   -1.185082
            _Iage_5 |  -1.601982   .6723302    -2.38   0.017    -2.919761   -.2842042
            _Iage_6 |  -.8837538   .6510124    -1.36   0.175    -2.159749    .3922412
            _Iage_7 |  -.0601043    .617815    -0.10   0.923    -1.271032    1.150823
            _Iage_8 |   .5050552   .6003687     0.84   0.400    -.6716773    1.681788
            _Iage_9 |   .8535159   .5741887     1.49   0.137    -.2719035    1.978935
           _Iage_10 |   .9138245   .5566391     1.64   0.101    -.1771973    2.004846
           _Iage_11 |   1.018597   .5269809     1.93   0.053     -.014294    2.051489
           _Iage_12 |   1.068367   .4319063     2.47   0.013     .2218238    1.914911
           _Iage_13 |          0  (omitted)
         _Isector_2 |   1.615665   .5256559     3.07   0.002     .5853705    2.645959
         _Isector_3 |   .8074404   .5199995     1.55   0.120    -.2117673    1.826648
         _Isector_4 |  -2.100734   .5617488    -3.74   0.000    -3.201771   -.9996971
         _Isector_5 |   .1310732   .5439328     0.24   0.810     -.935044     1.19719
         _Isector_6 |   .0818114    .647586     0.13   0.899    -1.187468    1.351091
              _cons |   10.82146   1.410763     7.67   0.000     8.056343    13.58658
      --------------+----------------------------------------------------------------
            sigma_u |  8.5185288
            sigma_e |  5.1619774
                rho |  .73142173   (fraction of variance due to u_i)
      -------------------------------------------------------------------------------
      
      . estimates store fe
      
      . xi: xtreg wages i.high_qual training_hrs i.illness_disability i.sex i.children i.general_health i.region i.age i.sector, re vce(cluster id)
      i.high_qual       _Ihigh_qual_1-9     (naturally coded; _Ihigh_qual_1 omitted)
      i.illness_dis~y   _Iillness_d_1-2     (naturally coded; _Iillness_d_1 omitted)
      i.sex             _Isex_1-2           (naturally coded; _Isex_1 omitted)
      i.children        _Ichildren_0-9      (naturally coded; _Ichildren_0 omitted)
      i.general_hea~h   _Igeneral_h_1-5     (naturally coded; _Igeneral_h_1 omitted)
      i.region          _Iregion_1-12       (naturally coded; _Iregion_1 omitted)
      i.age             _Iage_1-13          (naturally coded; _Iage_1 omitted)
      i.sector          _Isector_1-6        (naturally coded; _Isector_1 omitted)
      note: _Ichildren_7 omitted because of collinearity.
      note: _Ichildren_8 omitted because of collinearity.
      note: _Ichildren_9 omitted because of collinearity.
      note: _Iage_13 omitted because of collinearity.
      
      Random-effects GLS regression                   Number of obs     =     81,014
      Group variable: id                              Number of groups  =     45,174
      
      R-squared:                                      Obs per group:
           Within  = 0.0093                                         min =          1
           Between = 0.2259                                         avg =        1.8
           Overall = 0.2153                                         max =          4
      
                                                      Wald chi2(43)     =   11825.03
      corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000
      
                                       (Std. err. adjusted for 45,174 clusters in id)
      -------------------------------------------------------------------------------
                    |               Robust
              wages | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
      --------------+----------------------------------------------------------------
      _Ihigh_qual_2 |  -2.226562   .1291234   -17.24   0.000    -2.479639   -1.973484
      _Ihigh_qual_3 |  -2.750473   .1155294   -23.81   0.000    -2.976906   -2.524039
      _Ihigh_qual_4 |  -3.690913   .1140873   -32.35   0.000     -3.91452   -3.467306
      _Ihigh_qual_5 |  -4.429453   .1463206   -30.27   0.000    -4.716236    -4.14267
      _Ihigh_qual_9 |  -5.281472   .1727665   -30.57   0.000    -5.620089   -4.942856
       training_hrs |   .0006149   .0002984     2.06   0.039       .00003    .0011998
      _Iillness_d_2 |   .1494179   .0708485     2.11   0.035     .0105575    .2882783
            _Isex_2 |  -1.712939   .0851025   -20.13   0.000    -1.879737   -1.546141
       _Ichildren_1 |  -.3398704    .097535    -3.48   0.000    -.5310355   -.1487054
       _Ichildren_2 |  -.2720838   .1301761    -2.09   0.037    -.5272243   -.0169434
       _Ichildren_3 |  -1.174362   .1976833    -5.94   0.000    -1.561814   -.7869101
       _Ichildren_4 |  -1.975734   .3193612    -6.19   0.000    -2.601671   -1.349797
       _Ichildren_5 |  -2.071639   .7868031    -2.63   0.008    -3.613745   -.5295336
       _Ichildren_6 |  -4.674262   1.116908    -4.19   0.000    -6.863361   -2.485162
       _Ichildren_7 |          0  (omitted)
       _Ichildren_8 |          0  (omitted)
       _Ichildren_9 |          0  (omitted)
      _Igeneral_h_2 |   -.378106   .0746783    -5.06   0.000    -.5244728   -.2317392
      _Igeneral_h_5 |  -.9154749   .1839044    -4.98   0.000    -1.275921   -.5550288
         _Iregion_2 |   .2585602    .177916     1.45   0.146    -.0901486    .6072691
         _Iregion_3 |  -.2284908   .1794094    -1.27   0.203    -.5801268    .1231452
         _Iregion_4 |   .0518488    .189648     0.27   0.785    -.3198545    .4235521
         _Iregion_5 |   .5359982   .1955516     2.74   0.006     .1527241    .9192723
         _Iregion_6 |   .9415514   .1921035     4.90   0.000     .5650355    1.318067
         _Iregion_7 |   1.394893   .1875851     7.44   0.000     1.027233    1.762553
         _Iregion_8 |   1.466192   .1884479     7.78   0.000     1.096841    1.835543
         _Iregion_9 |  -.0282937   .1922539    -0.15   0.883    -.4051044     .348517
        _Iregion_10 |  -.2318236   .1853624    -1.25   0.211    -.5951273      .13148
        _Iregion_11 |   .5588212   .1774352     3.15   0.002     .2110545    .9065879
        _Iregion_12 |  -.1259098   .1794076    -0.70   0.483    -.4775421    .2257226
            _Iage_2 |  -1.444498   .3181577    -4.54   0.000    -2.068076   -.8209206
            _Iage_3 |  -1.083344   .2938119    -3.69   0.000    -1.659204   -.5074829
            _Iage_4 |  -.4572263   .2795858    -1.64   0.102    -1.005204    .0907518
            _Iage_5 |   .7066099   .2763311     2.56   0.011     .1650109    1.248209
            _Iage_6 |   2.172958   .2788041     7.79   0.000     1.626512    2.719404
            _Iage_7 |   3.112897   .2813211    11.07   0.000     2.561518    3.664277
            _Iage_8 |   3.531657   .2780079    12.70   0.000     2.986772    4.076543
            _Iage_9 |    3.64247   .2767357    13.16   0.000     3.100078    4.184862
           _Iage_10 |   3.376981   .2751978    12.27   0.000     2.837603    3.916359
           _Iage_11 |    3.20236   .2804129    11.42   0.000     2.652761    3.751959
           _Iage_12 |   2.376967   .2801664     8.48   0.000     1.827851    2.926083
           _Iage_13 |          0  (omitted)
         _Isector_2 |  -.3820282   .2324561    -1.64   0.100    -.8376337    .0735774
         _Isector_3 |   -2.93446   .2312363   -12.69   0.000    -3.387675   -2.481245
         _Isector_4 |  -6.914072   .2401358   -28.79   0.000     -7.38473   -6.443415
         _Isector_5 |  -4.267661     .23468   -18.19   0.000    -4.727626   -3.807697
         _Isector_6 |  -4.637669   .2569436   -18.05   0.000     -5.14127   -4.134069
              _cons |   14.90749     .39036    38.19   0.000     14.14239    15.67258
      --------------+----------------------------------------------------------------
            sigma_u |  6.4843857
            sigma_e |  5.1619774
                rho |  .61210157   (fraction of variance due to u_i)
      -------------------------------------------------------------------------------
      
      . estimates store re
      
      
      . rhausman fe re, cluster 
      bootstrap in progress
      ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
      .................................................. 50
      .................................................. 100
      --------------------------------------------------------------------------------
      Cluster-Robust Hausman Test
      (based on 100 bootstrap repetitions)
      
      b1: obtained from xtreg wages _Ihigh_qual_* training_hrs _Iillness_d_* _Isex_* _Ichildren_* _Igeneral_h_* _Iregion_* _Iage_* _Isector_*, fe v
      > ce(cluster id)
      b2: obtained from xtreg wages _Ihigh_qual_* training_hrs _Iillness_d_* _Isex_* _Ichildren_* _Igeneral_h_* _Iregion_* _Iage_* _Isector_*, re v
      > ce(cluster id)
      Excluded (not identified, or only identified in one model):  _Ichildren_7 _Ichildren_8 _Ichildren_9 _Iage_13
      
          Test:  Ho:  difference in coefficients not systematic
      
                       chi2(43) = (b1-b2)' * [V_bootstrapped(b1-b2)]^(-1) * (b1-b2)
                                =      719.93
                      Prob>chi2 =      0.0000
      
      .

      Kind Regards,
      Anara

      Comment


      • #18
        Anara:
        as per -rhausman- outcome, you should go -fe-.
        The low within R_sq and the coefficients failing to reach statistical significance may be due to a small within variation in time-varying variables in your dataset.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #19
          thank you for all your help! very grateful, Carlo Lazzaro

          Comment

          Working...
          X