Announcement

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

  • Fixed effects linear regression model: Heteroscedasticity testing

    Hello all,

    I have a fixed effects linear regression model with panel data. Do I use the Breusch-Pagan -hettest- after the -reg- command or do I use the Groupwise heteroscedasticity test -xttest3- after the -xtreg- command?

    Which one is most valid to use? I have tried both and all models turn out with heteroscedasticity present, so I will correct with using -,robust- at the end of my command.

    Best,
    Peter

  • #2
    Peter:
    1) if you're using -regress- with -panelid- as a predictor, go -estat hettest-;
    2) if you're using -xtreg,fe- (which is more advisable), you should switch to the community-contributed module -xttest3- (actually, -xtreg- does not support -estat hettest-);
    As an aside, please note that under -xtreg- both the -robust- and the -vce(cluster clusterid)- options call the cluster-robust standard errors and take both heteroskedasticity and/or autocorrelation into account. Conversely, under -regress- the -robust- option takes heteroskedasticity only into account.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Thanks again Carlo! You are my blessing during this challenging thesis period!

      Comment


      • #4
        Hi Carlo and Peter,

        What would be the difference between using robust and cve(cluster clusterid) options? I see that the standard errors do not change in the case of xtreg, but they do change for reg and reghdfe. Why is it the case?
        Thank you so much,

        Comment


        • #5
          Paola,

          Cluster-robust standard errors account for the fact that the predictors and errors within groups can be correlated (not independent) which yields less information per observation that i.i.d. observations, so standard errors are often significantly larger. Using just "robust" does not account for clustering, just heteroskedasticity.

          Comment


          • #6
            But there is a bit more to the story. As O.P. noted, with -xtreg, fe- she gets the same results with -robust- and -vce(cluster...)-. That's because the unclustered robust standard error calculation is not valid with -xtreg, fe- (nor with -xtpoisson, fe-_. And as of version 13, Stata automatically substitutes -vce(custer ...)- when -robust- is specified with either of those two commands. As far as I know, this is the only circumstance where Stata overrides your command and doesn't give you a warning message.

            Comment


            • #7
              Just to make sure I understand: When I use xtpoisson, fe with vce(cluster VAR), I get an error statement about option cluster not allowed. I also tried cluster(VAR). So, you cannot give the right command, but it fixes if for you anyway?

              Comment


              • #8
                Yes.

                Comment


                • #9
                  Paola:
                  IMHO, another interesting, OLS-related issue (that pops up on this forum from time to time) is what option to choose for non-default standard errors (SEs) when you detect both heteroskedasticity and autocorrelation, as under -regress- -robust- and -vce(cluster clusterid)- deal with different nuisances. The recommendation is to switch to heteroskedasticity- and autocorrelation- consistent SEs, that can be invoked in Stata via -newey-.
                  This and other interesting topics concerning OLS SEs are covered in an excellent way in KitBaum and Stan Hurs's recent textbook
                  https://www.stata.com/bookstore/environmental-econometrics-using-stata (pages 26-30).
                  Kind regards,
                  Carlo
                  (StataNow 18.5)

                  Comment

                  Working...
                  X