Announcement

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

  • xtreg

    I am doing a balanced panel regression (fixed effects model after testing) regarding 20 countries. However, i face a problem of heteroscedasticity and it causes me to have insignificant results once i add robust into -xtreg, robust fe- My variables were significant before adding robust, how do I fix this as I need my data to be significant in order to justify my findings.

    Click image for larger version

Name:	ROBUST ERROR.jpg
Views:	1
Size:	109.6 KB
ID:	1751079

  • #2
    Marcus:
    welcome to this forum.
    Twenty clusters are too few to use cluster-robust standard errors successfully (Cameron_Miller_JHR_2015_February.pdf (ucdavis.edu)).
    That said, you may want to check if heteroskedasticity can be fixed via a new specification of your regression.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Thank you and I am glad to join this community. I have changed the specification and gotten this, is this data feasible as it is robust after checking for heteroskedasticity via -xttest3- . That said, along with robustness, could I conclude this data and start my analytics?

      Click image for larger version

Name:	robust.jpg
Views:	1
Size:	121.2 KB
ID:	1751184

      Comment


      • #4
        Dear Carlo,
        May I know when testing for robustness, is -xtreg y x, fe robust- better or is -xtreg y x, fe vce(cluster country)- better to use since the results ive received are indifferent

        Comment


        • #5
          Marcus:
          both options do the very same job under -xtreg-, as the call cluster-robust standard errors, which take bith heteroskedasticity and/or autocoorelation of the epsilon into account.
          That said, another test that I would run is on the potential misspecification of the functional form of the regressand, that can be considered, at large, as a test for the potential misspecification of the whole regression.
          It is available fro -linktest- that, unfortunately, does not worl after -xtreg-. However, it is easy to do it by hand, as in the following toy-example:
          Code:
          . use https://www.stata-press.com/data/r18/nlswork.dta
          (National Longitudinal Survey of Young Women, 14-24 years old in 1968)
          
          . xtreg ln_wage c.age##c.age, fe vce(cluster idcode)
          
          Fixed-effects (within) regression               Number of obs     =     28,510
          Group variable: idcode                          Number of groups  =      4,710
          
          R-squared:                                      Obs per group:
               Within  = 0.1087                                         min =          1
               Between = 0.1006                                         avg =        6.1
               Overall = 0.0865                                         max =         15
          
                                                          F(2, 4709)        =     507.42
          corr(u_i, Xb) = 0.0440                          Prob > F          =     0.0000
          
                                       (Std. err. adjusted for 4,710 clusters in idcode)
          ------------------------------------------------------------------------------
                       |               Robust
               ln_wage | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
          -------------+----------------------------------------------------------------
                   age |   .0539076    .004307    12.52   0.000     .0454638    .0623515
                       |
           c.age#c.age |  -.0005973    .000072    -8.30   0.000    -.0007384   -.0004562
                       |
                 _cons |    .639913   .0624195    10.25   0.000     .5175415    .7622845
          -------------+----------------------------------------------------------------
               sigma_u |   .4039153
               sigma_e |  .30245467
                   rho |  .64073314   (fraction of variance due to u_i)
          ------------------------------------------------------------------------------
          
          . predict fitted, xb
          (24 missing values generated)
          
          . gen sq_fitted=fitted^2
          (24 missing values generated)
          
          . xtreg ln_wage fitted sq_fitted , fe vce(cluster idcode)
          
          Fixed-effects (within) regression               Number of obs     =     28,510
          Group variable: idcode                          Number of groups  =      4,710
          
          R-squared:                                      Obs per group:
               Within  = 0.1092                                         min =          1
               Between = 0.1033                                         avg =        6.1
               Overall = 0.0881                                         max =         15
          
                                                          F(2, 4709)        =     523.09
          corr(u_i, Xb) = 0.0467                          Prob > F          =     0.0000
          
                                       (Std. err. adjusted for 4,710 clusters in idcode)
          ------------------------------------------------------------------------------
                       |               Robust
               ln_wage | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
          -------------+----------------------------------------------------------------
                fitted |   2.569185   .7085064     3.63   0.000     1.180181    3.958189
             sq_fitted |    -.47432   .2153021    -2.20   0.028    -.8964128   -.0522272
                 _cons |  -1.290258    .580562    -2.22   0.026    -2.428431   -.1520844
          -------------+----------------------------------------------------------------
               sigma_u |    .403403
               sigma_e |  .30238578
                   rho |  .64025357   (fraction of variance due to u_i)
          ------------------------------------------------------------------------------
          
          . test sq_fitted
          
           ( 1)  sq_fitted = 0
          
                 F(  1,  4709) =    4.85
                      Prob > F =    0.0276
          
          .
          As -test- outcome reaches statistical significance (as expected) the model is misspecified (more predictiors should be plugged in the right-hand side of the regression equation).
          Kind regards,
          Carlo
          (StataNow 18.5)

          Comment

          Working...
          X