Announcement

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

  • #16
    Thank you! Does that mean i.Year in both FE and RE? In this case, the Hausman results that Random is better. Do you have a source on this approach?

    What is the advantage of your proposed code over Hausman?

    Comment


    • #17
      Siegfried:
      1) -hausman. test (Hausman, J. A. 1978. Specification tests in econometrics. Econometrica 46: 1251–1271. https://doi.org/10.2307/1913827.) compare the coefficients that are shared between the -fe- and the -re- estimator. I fail to get why -i.year- should be kicked out from the set of the preductors before running -hausman- (if that is what you mean): if you decide to include -i.year- in .fe- specif8cation only, the -hausman- machinery will simly not take it into account.
      2) if your interested in the difference between -hausman- and the community-contributed module -xtoverid-, see the following toy-example:
      Code:
      . use https://www.stata-press.com/data/r17/nlswork.dta
      (National Longitudinal Survey of Young Women, 14-24 years old in 1968)
      
      . xtset idcode year
      
      Panel variable: idcode (unbalanced)
       Time variable: year, 68 to 88, but with gaps
               Delta: 1 unit
      
      . quietly xtreg ln_wage c.age##c.age, vce(cluster idcode) fe
      
      . estimates store fe
      
      . quietly xtreg ln_wage c.age##c.age, vce(cluster idcode) re
      
      . estimates store re
      
      . hausman fe re ///-hausman- does not support non-default standard errors///
      hausman cannot be used with vce(robust), vce(cluster cvar), or p-weighted data
      r(198);
      
      . quietly xtreg ln_wage c.age##c.age, vce(cluster idcode) re
      
      . xtoverid ///-xtoverid- does not support -fvvarlist- notation///
      cage#c:  operator invalid
      r(198);
      
      . g sq_age=age^2 ///this is the work-around that allows for squared term creation by hand ///
      
      
      . quietly xtreg ln_wage age sq_age, vce(cluster idcode) re
      
      . xtoverid ///-xtoverid- null: -re- is the way to go///
      
      Test of overidentifying restrictions: fixed vs random effects
      Cross-section time-series model: xtreg re  robust cluster(idcode)
      Sargan-Hansen statistic  60.741  Chi-sq(2)    P-value = 0.0000
      ///-xtoverid- outcome points you out to -fe- specification///
      .
      Last edited by Carlo Lazzaro; 31 Oct 2022, 03:03.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #18
        Wait

        Comment


        • #19
          Code:
          xtreg ESGScore RELINT CENSUSPOPINT percentwhite percenturbanipol age_int repint TOTALASSETS RETURNONASSETS TOTALDEBTTOTALCAPITALSTD MRKTVALUETOBOOK TobinsQ i.Year, fe
          estimates store fixed
          xtreg ESGScore RELINT CENSUSPOPINT percentwhite percenturbanipol age_int repint TOTALASSETS RETURNONASSETS TOTALDEBTTOTALCAPITALSTD MRKTVALUETOBOOK TobinsQ i.Year, re
          hausman fixed
          Code:
          . hausman fixed
          
          Note: the rank of the differenced variance matrix (24) does not equal the number
                  of coefficients being tested (29); 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))
                       |     fixed          .          Difference          S.E.
          -------------+----------------------------------------------------------------
                RELINT |     8.27648    -2.663957        10.94044        3.851563
          CENSUSPOPINT |   -3.38e-07     3.93e-07       -7.32e-07        1.94e-06
          percentwhite |    16.90004     1.686267        15.21377        6.523651
          percenturb~l |   -20.07824     .3500672       -20.42831        12.17013
               age_int |   -.2138276     .0922228       -.3060504        .2647666
                repint |    4.309962      .264448        4.045514        2.040134
           TOTALASSETS |    2.27e-08     3.68e-08       -1.41e-08        2.16e-09
          RETURNONAS~S |   -.0033905     .0053493       -.0087398        .0026836
          TOTALDEBTT~D |   -.0085192     -.004429       -.0040902        .0012337
          MRKTVALUET~K |     .002212     .0023169       -.0001049               .
               TobinsQ |   -.0101047    -.1598556        .1497509        .0480765
                  Year |
                 2003  |    .3960878     .1123887         .283699               .
                 2004  |    4.095441      3.47511        .6203314        .1680503
                 2005  |    7.673055     6.613837        1.059218        .2969452
                 2006  |     8.95613     7.470588        1.485542        .4144061
                 2007  |    17.22758     15.27563        1.951952        .5282034
                 2008  |    22.26464     19.82632        2.438324        .6375119
                 2009  |    24.94106     22.24356        2.697499         .734646
                 2010  |    27.82836     24.76911        3.059246        .8328412
                 2011  |    30.49884     27.11185        3.386993        .8976187
                 2012  |    30.93711     27.24393        3.693177        .9601135
                 2013  |    31.38636     27.39014        3.996225        1.036738
                 2014  |    32.48303     28.16678        4.316251        1.115143
                 2015  |    35.52905      30.8692        4.659848        1.188819
                 2016  |    38.23312     33.19154        5.041581        1.266043
                 2017  |    40.78256      35.4611        5.321459        1.335637
                 2018  |    42.36351     36.58236         5.78115        1.405341
                 2019  |    44.68547     38.58843        6.097047        1.479787
                 2020  |    48.24414     41.76166        6.482482        1.557262
          ------------------------------------------------------------------------------
                                     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(24) = (b-B)'[(V_b-V_B)^(-1)](b-B)
                                    =       68.14
                          Prob>chi2 =      0.0000
                          (V_b-V_B is not positive definite)
          This is the result i get when using hausman!

          Comment


          • #20
            Siegfried:
            with 568 panels default standard errors are, in all likelihood, misleading.
            Go cluster-robust and then -xtoverid-.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #21
              I do a lot of regressions. So I change dependent and independent variables. Do I have to test for each model separately, whether FE or RE? Basically I split the ESG score into E S and G. Additionally, am I looking at individual religion types in the US?

              Do you think the insignificance issue with i.Year can come from the fact that my panel is unbalanced since I am considering the change in the S&P 500 in terms of constituents?

              Comment


              • #22
                Siegfried:
                1) doing a lot of regressions hunting for significant predictors is not the way to go. Your regression should give a fair nad true view of the data generating process you're investigating.
                2) you should apply the estimator that is consistent (and possibly efficient) with your dataset;
                3) to test the joint significance of -i.year-, see -testparm-.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #23
                  Carlo:
                  Thank you!

                  Comment


                  • #24
                    I don't understand why the Random Effects Tobit Model is not an option, since it takes into account that the ESG score can only range from 0-1?

                    Comment


                    • #25
                      Siegfried_
                      is ESG censored from right and/or left?
                      Last edited by Carlo Lazzaro; 02 Nov 2022, 01:53.
                      Kind regards,
                      Carlo
                      (Stata 19.0)

                      Comment


                      • #26
                        Yes it only ranges from 0 to one. The command xtoverid command doesnt work for me too.
                        Code:
                        2002b:  operator invalid
                        I always get this error message.

                        Comment


                        • #27
                          Siegfried:
                          1) therefore, your variable is not censored. It simply varies between 0 and 1, bounds included.
                          2) the -xi:- prefix is the fix here (pun unintended ):
                          Code:
                          . use "https://www.stata-press.com/data/r17/nlswork.dta"
                          (National Longitudinal Survey of Young Women, 14-24 years old in 1968)
                          
                          . xi: xtreg ln_wage i.race i.year, re vce(cluster idcode)
                          i.race            _Irace_1-3          (naturally coded; _Irace_1 omitted)
                          i.year            _Iyear_68-88        (naturally coded; _Iyear_68 omitted)
                          
                          Random-effects GLS regression                   Number of obs     =     28,534
                          Group variable: idcode                          Number of groups  =      4,711
                          
                          R-squared:                                      Obs per group:
                               Within  = 0.1058                                         min =          1
                               Between = 0.0975                                         avg =        6.1
                               Overall = 0.0907                                         max =         15
                          
                                                                          Wald chi2(16)     =    1321.80
                          corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000
                          
                                                       (Std. err. adjusted for 4,711 clusters in idcode)
                          ------------------------------------------------------------------------------
                                       |               Robust
                               ln_wage | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
                          -------------+----------------------------------------------------------------
                              _Irace_2 |  -.1279049   .0127384   -10.04   0.000    -.1528717   -.1029381
                              _Irace_3 |   .0900274   .0609305     1.48   0.140    -.0293942    .2094489
                             _Iyear_69 |    .085839    .010195     8.42   0.000     .0658571    .1058209
                             _Iyear_70 |   .0702121   .0103353     6.79   0.000     .0499553    .0904689
                             _Iyear_71 |   .1200453   .0108527    11.06   0.000     .0987745    .1413161
                             _Iyear_72 |   .1329282    .011754    11.31   0.000     .1098907    .1559657
                             _Iyear_73 |   .1480458   .0117481    12.60   0.000     .1250199    .1710717
                             _Iyear_75 |   .1615023   .0117297    13.77   0.000     .1385124    .1844921
                             _Iyear_77 |   .2215681   .0121434    18.25   0.000     .1977674    .2453688
                             _Iyear_78 |   .2603374   .0125917    20.68   0.000     .2356582    .2850166
                             _Iyear_80 |   .2685209   .0128514    20.89   0.000     .2433326    .2937093
                             _Iyear_82 |   .2858463    .012884    22.19   0.000      .260594    .3110985
                             _Iyear_83 |   .3132819   .0134049    23.37   0.000     .2870088     .339555
                             _Iyear_85 |   .3656784   .0129719    28.19   0.000     .3402539    .3911028
                             _Iyear_87 |   .3814745   .0133834    28.50   0.000     .3552436    .4077054
                             _Iyear_88 |   .4370321   .0144939    30.15   0.000     .4086246    .4654395
                                 _cons |     1.4612   .0106163   137.64   0.000     1.440393    1.482008
                          -------------+----------------------------------------------------------------
                               sigma_u |  .36492114
                               sigma_e |  .30294584
                                   rho |  .59200363   (fraction of variance due to u_i)
                          ------------------------------------------------------------------------------
                          
                          . xtoverid
                          
                          Test of overidentifying restrictions: fixed vs random effects
                          Cross-section time-series model: xtreg re  robust cluster(idcode)
                          Sargan-Hansen statistic  75.575  Chi-sq(14)   P-value = 0.0000
                          
                          .
                          Kind regards,
                          Carlo
                          (Stata 19.0)

                          Comment

                          Working...
                          X