Announcement

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

  • #16
    Dear Carlo,
    (1)so thisabove is correct? And based on this result using FE is also correct?
    I read that if (b-B) is negative this test isn´t good to use.

    (2)After running testparm, xttest3 and xtserial -> result is that I need time and entity fixed effects with robust.
    So based on this I run my analysis with -xtreg Y X1 i.Jahr i.Unternehmen, fe- or xtreg Y X1 i.Jahr, fe vce (clustering Unternehmen)?
    Or I have pay attention to other things before I analysis teh results of my Paneldata?

    Code:
    . xtset Unternehmen Jahr
           panel variable:  Unternehmen (unbalanced)
            time variable:  Jahr, 2014 to 2018, but with gaps
                    delta:  1 year
    
    . xtreg Y x1 x2 x3 x4 x5 x6 x7 x8, fe
    
    Fixed-effects (within) regression               Number of obs     =        342
    Group variable: Unternehmen                     Number of groups  =         79
    
    R-sq:                                           Obs per group:
         within  = 0.6824                                         min =          1
         between = 0.4075                                         avg =        4.3
         overall = 0.5437                                         max =          5
    
                                                    F(8,255)          =      68.49
    corr(u_i, Xb)  = -0.1496                        Prob > F          =     0.0000
    
    ------------------------------------------------------------------------------
               Y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
              x1 |   .0128093   .0153769     0.83   0.406    -.0174725    .0430911
              x2 |   4.083074   5.346918     0.76   0.446    -6.446667    14.61282
              x3 |  -.4497777   .2771056    -1.62   0.106    -.9954846    .0959293
              x4 |  -11.32917   3.383207    -3.35   0.001    -17.99176   -4.666583
              x5 |  -3.519048   1.959478    -1.80   0.074    -7.377868    .3397721
              x6 |    9.92606   .5804257    17.10   0.000     8.783021     11.0691
              x7 |  -.0111755   .0053999    -2.07   0.039    -.0218095   -.0005415
              x8 |  -.1215953    .195648    -0.62   0.535     -.506887    .2636964
           _cons |   27.40328   63.19683     0.43   0.665     -97.0509    151.8575
    -------------+----------------------------------------------------------------
         sigma_u |  21.633437
         sigma_e |  13.564273
             rho |  .71780538   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    F test that all u_i=0: F(78, 255) = 5.95                     Prob > F = 0.0000
    
    . estimates store fe
    
    . xtreg Y x1 x2 x3 x4 x5 x6 x7 x8, re
    
    Random-effects GLS regression                   Number of obs     =        342
    Group variable: Unternehmen                     Number of groups  =         79
    
    R-sq:                                           Obs per group:
         within  = 0.6710                                         min =          1
         between = 0.5256                                         avg =        4.3
         overall = 0.6129                                         max =          5
    
                                                    Wald chi2(8)      =     603.60
    corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0000
    
    ------------------------------------------------------------------------------
               Y |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
              x1 |    .001746    .012699     0.14   0.891    -.0231436    .0266356
              x2 |   2.012407   1.868184     1.08   0.281    -1.649166     5.67398
              x3 |   -.324558    .261794    -1.24   0.215    -.8376647    .1885488
              x4 |  -6.478347    2.17762    -2.97   0.003     -10.7464   -2.210291
              x5 |  -4.722696   1.986387    -2.38   0.017    -8.615943    -.829449
              x6 |   10.35883   .5316531    19.48   0.000     9.316814    11.40086
              x7 |  -.0057961   .0054003    -1.07   0.283    -.0163804    .0047882
              x8 |   .2675972   .1818282     1.47   0.141    -.0887796    .6239739
           _cons |   14.44656   30.33804     0.48   0.634     -45.0149    73.90802
    -------------+----------------------------------------------------------------
         sigma_u |  15.238365
         sigma_e |  13.564273
             rho |  .55792716   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    
    . estimates store re
    
    . hausmann fe re
    command hausmann is unrecognized
    r(199);
    
    . hausman fe re
    
                     ---- Coefficients ----
                 |      (b)          (B)            (b-B)     sqrt(diag(V_b-V_B))
                 |       fe           re         Difference          S.E.
    -------------+----------------------------------------------------------------
              x1 |    .0128093      .001746        .0110633        .0086708
              x2 |    4.083074     2.012407        2.070667        5.009932
              x3 |   -.4497777     -.324558       -.1252197        .0908373
              x4 |   -11.32917    -6.478347       -4.850822        2.589221
              x5 |   -3.519048    -4.722696        1.203648               .
              x6 |     9.92606     10.35883       -.4327748        .2328927
              x7 |   -.0111755    -.0057961       -.0053794               .
              x8 |   -.1215953     .2675972       -.3891924        .0722263
    ------------------------------------------------------------------------------
                               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(8) = (b-B)'[(V_b-V_B)^(-1)](b-B)
                              =       43.70
                    Prob>chi2 =      0.0000
                    (V_b-V_B is not positive definite)
    
    .

    Comment


    • #17
      Lu:
      Code:
      xtreg Y X1 i.Jahr, re vce (clustering Unternehmen)
      xtoverid
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #18
        This isn´t possible...

        Code:
        . xtreg  Y x1 x2 x3 x4 x5 x6 x7 x8 i.Jahr, re vce (clustering Unternehmen)
        vcetype 'clustering' not allowed
        r(198);

        Comment


        • #19
          Lu:

          Code:
          xtreg Y X1 i.Jahr, re vce (cluster Unternehmen)  
           xtoverid
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #20
            Originally posted by Carlo Lazzaro View Post
            Lu:

            Code:
            xtreg Y X1 i.Jahr, re vce (cluster Unternehmen)
            xtoverid
            Unfortunately it doesnt work...
            I just need a way to explain why I work with FE or RE as my basis.
            Is this not possible with Hausman beacuse of the negative og (b-B)?

            Comment


            • #21
              Code:
              Random-effects GLS regression                   Number of obs     =        342
              Group variable: Unternehmen                     Number of groups  =         79
              
              R-sq:                                           Obs per group:
                   within  = 0.7377                                         min =          1
                   between = 0.5406                                         avg =        4.3
                   overall = 0.6476                                         max =          5
              
                                                              Wald chi2(12)     =     532.43
              corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0000
              
                                         (Std. Err. adjusted for 79 clusters in Unternehmen)
              ------------------------------------------------------------------------------
                           |               Robust
                         Y |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
              -------------+----------------------------------------------------------------
                        x1 |   .0039398   .0103555     0.38   0.704    -.0163565    .0242361
                        x2 |   1.303289   1.833862     0.71   0.477    -2.291015    4.897594
                        x3 |  -.4225619   .3114795    -1.36   0.175     -1.03305    .1879266
                        x4 |  -6.326288   2.197932    -2.88   0.004    -10.63416   -2.018421
                        x5 |   13.92079   4.239336     3.28   0.001     5.611843    22.22973
                        x6 |   10.41975   .8396481    12.41   0.000     8.774075    12.06543
                        x7 |   .0151354   .0088056     1.72   0.086    -.0021233     .032394
                        x8 |   .5512994   .2534051     2.18   0.030     .0546346    1.047964
                           |
                      Jahr |
                     2015  |   15.11175   3.190793     4.74   0.000     8.857908    21.36559
                     2016  |   26.88943   5.605715     4.80   0.000     15.90243    37.87643
                     2017  |    20.4872   6.415118     3.19   0.001     7.913802     33.0606
                     2018  |   26.10513   3.804216     6.86   0.000     18.64901    33.56126
                           |
                     _cons |  -88.17021   38.78879    -2.27   0.023    -164.1948   -12.14557
              -------------+----------------------------------------------------------------
                   sigma_u |  15.807309
                   sigma_e |  12.193207
                       rho |   .6269576   (fraction of variance due to u_i)
              ------------------------------------------------------------------------------
              
              . xtoverid
              2014b:  operator invalid
              r(198);

              Comment


              • #22
                Lu:
                Code:
                 xi: xtreg Y X1 i.Jahr, re vce (cluster Unternehmen)    
                xtoverid
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #23
                  Thank you but I don´t understand the background: Why it isn´t possible to use first just xtreg fe and xtreg re with hausman and following make the Analysis?

                  Comment


                  • #24
                    Lu:
                    you can act as you describe in your last post provided that you use default standard errors, as -hausman- does not support non-default standard errors.
                    Conversely, you should not run -hausman- with default standard errors and then invoke non-default standard errors.
                    Hence the ultimate issue is: do you need cluster robust standard errors because of heteroskedasticity and/or autocorrelation in your data?
                    If the answer is yes, you cannot use -hausman- and should switch to -xtoverid-. That's all.
                    Kind regards,
                    Carlo
                    (Stata 19.0)

                    Comment


                    • #25
                      Now I understand - thank you very much !

                      Comment

                      Working...
                      X