Announcement

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

  • Using GLS or OLS for country data with heteroskedasticity

    Hello.
    I am performing an analysis of a country and time specific variable for about 60 different countries over ar 21 year time period.
    Thus I have a panel-data set of T=21 and N=60.
    As my variable by every logic reason should depend on other state-specific traits, I am running my regression with fixed effects.
    Running a Wald-test for groupwise heteroskedasticity I find, chi2 (59) = 9588.82 Prob>chi2 = 0.0000. Thus I clearly have heteroskedasticity.
    My question is then, should I still use XTREG with robust standard errors?
    I have a notion, that this should be run as an OLS-regression, as I have significantly more panel variables than time variables, but I am not certain it is the case.

  • #2
    All help is greatly appreciated.
    Thank you very much in advance!

    Comment


    • #3
      What is your dependent variable?

      Comment


      • #4
        My dependent variable is a measure I've constructed of the equating effects of state redistribution

        Comment


        • #5
          Jannik:
          I'd go -xtreg,fe vce(cluster panelid)-
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            Hello Carlo.
            Thank you very much for your answer and in general to your contribution to this forum, I've had much use of many answers of yours!
            Just to be clear, when running an OLS with fixed effects in Stata it interprets robust variables as vce(cluster) automatically right?
            Furthermore to be sure, that my results are not driven by outliers, running a quantile regression for fixed effects should be feasible right?

            Comment


            • #7
              Jannik:
              not quite.
              Unlike -xtreg,fe- -regress- adjust the standard errors for heteroskedasticty (see the option -robust-) and autocorrelation (see the option -vce(cluster clusterid) separately.
              Both options should be imposed by the researcher, though.
              As far as outliers are concerned (I'm a bit queasy about the correctness of the definition of ouliers. Set aside blatand data entry errors, many data generating processes allow "extreme" observation. A case in point is the Gamma distribution, with its long right tail), I would start with a visual inspection but I would not omit them if part of the data generating process under investigation.
              Kind regards,
              Carlo
              (Stata 19.0)

              Comment


              • #8
                Carlo:
                In that case these results kind of riddle me? (see below results of baseline regression)
                It seems the specification is identical whether I cluster standard errors by country or run the regression with robust standard error. Am I overlooking something crucial here?




                xtreg deltaG vdem, fe vce(cluster countrycode)

                Fixed-effects (within) regression Number of obs = 1,297
                Group variable: countrycode Number of groups = 59

                R-squared: Obs per group:
                Within = 0.0154 min = 21
                Between = 0.2512 avg = 22.0
                Overall = 0.1797 max = 22

                F(1,58) = 2.84
                corr(u_i, Xb) = -0.5960 Prob > F = 0.0972

                (Std. err. adjusted for 59 clusters in countrycode)
                ------------------------------------------------------------------------------
                | Robust
                deltaG | Coefficient std. err. t P>|t| [95% conf. interval]
                -------------+----------------------------------------------------------------
                vdem | -.0347145 .0205893 -1.69 0.097 -.0759285 .0064994
                _cons | .1028449 .015274 6.73 0.000 .0722706 .1334192
                -------------+----------------------------------------------------------------
                sigma_u | .03547219
                sigma_e | .0144267
                rho | .85806819 (fraction of variance due to u_i)
                ------------------------------------------------------------------------------








                . xtreg deltaG vdem, fe r

                Fixed-effects (within) regression Number of obs = 1,297
                Group variable: countrycode Number of groups = 59

                R-squared: Obs per group:
                Within = 0.0154 min = 21
                Between = 0.2512 avg = 22.0
                Overall = 0.1797 max = 22

                F(1,58) = 2.84
                corr(u_i, Xb) = -0.5960 Prob > F = 0.0972

                (Std. err. adjusted for 59 clusters in countrycode)
                ------------------------------------------------------------------------------
                | Robust
                deltaG | Coefficient std. err. t P>|t| [95% conf. interval]
                -------------+----------------------------------------------------------------
                vdem | -.0347145 .0205893 -1.69 0.097 -.0759285 .0064994
                _cons | .1028449 .015274 6.73 0.000 .0722706 .1334192
                -------------+----------------------------------------------------------------
                sigma_u | .03547219
                sigma_e | .0144267
                rho | .85806819 (fraction of variance due to u_i)
                ------------------------------------------------------------------------------

                Comment


                • #9
                  Jannik:
                  no, it makes sense.
                  The difference I highlighted in my previous reply is about -regress-, whereas both the options do the very same job (and, as a consequence, your codes give back the very same coefficients) with -xtreg-.
                  That said, please note that your -xtreg,fe- outputs show a very low within R-sq, that calls for more predictors, as a first step.
                  Kind regards,
                  Carlo
                  (Stata 19.0)

                  Comment

                  Working...
                  X