Announcement

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

  • Unbalanced panel data - test for heteroskadisticity

    Dear all,

    I have unbalanced panel data and want to use the Breusch Pagan test and the White test to test for heteroskadisticity. I can't seem to find the right commands.

    Can someone explain to me if these tests can be used with panel data, so after xtreg, and what the commands are?

    Thanks in advance,

    Best regards

  • #2
    It's not easy to test for heteroskedasticity after random effects or fixed effects estimation. It's possible, and I can tell you how to do it if you give more details about your estimation. But why do you want to do it? Serial correlation is typically much more of a worry. And usually I wouldn't test for that, either, because I can cluster my standard errors (which accounts for serial correlation and heteroskedasticity). What are your specific data dimensions?

    Comment


    • #3
      Dear Mr. Wooldridge,

      Thank you for your reply. The reason I want to test for it is that the instructions tell me to. I have to include them for the completion of my work. I need to show why I have to take the log of some variables for example.

      Do you mean with "cluster my standard errors", robust standard errors?

      What dimensions do you mean? My dependent variable is FDI per GDP outflows, from host to home country, so bilateral. My ID are country pairs, my independent variables are posssible determinants of FDI.

      Comment


      • #4
        Dear Prof. Wooldridge,

        I have read more about it in the mean time.

        Is it correct that I can solve for heteroskedasticity by simply using robust standard errors? So the White test is not even necssary.

        Also I understand that serial correlation is autocorrelation and this can be solved with clustered standard errors. Could you explain to me how I can do this, and can I also combine clustered and robust standard errors?

        I'm new at STATA and doing these tests for the first time. I hope you can help me with this.

        Maybe I also have to mention I have orthogonalized some of my independent variables.

        Thank you in advance

        Comment


        • #5
          Kate: It would be much easier if you showed something about your data and commands. Generally, you want something like the:
          Code:
          xtreg y x1 ... xK, fe cluster(id)
          The standard errors are robust to any kind of heteroskedasticity and serial correlation. Of course, so are all test statistics and confidence intervals. I'm not sure why you would orthogonalize your independent variables. That will make their coefficients hard to interpret (even though it artificially eliminates multicollinearity). JW

          Comment


          • #6
            User written program xttest2 is available, its ssc description provides the following information
            DESCRIPTION/AUTHOR(S)

            xttest2 calculates the Breusch-Pagan statistic for
            cross-sectional independence in the residuals of a fixed effect
            regression model or a GLS model estimated from cross-section
            time-series data. xtreg, fe estimates this model assuming
            independence of the errors. A likely deviation from independent
            errors in the context of pooled cross-section time-series data
            (or panel data) is likely to be contemporaneous correlations
            across cross-sectional units. These correlations are those
            exploited by Zellner's seemingly unrelated regression (SUR)
            estimator, and this test is provided by sureg, corr in that
            context. This version of the routine is updated from that
            published in SJ 1-1 to properly handle unbalanced panels, and
            will work after ivreg2 on panel data.

            KW: contemporaneous correlation
            KW: panel data
            KW: cross-section time-series

            Requires: Stata version 6.0


            Author: Christopher F Baum, Boston College
            Support: email [email protected]

            Distribution-Date: 20110815


            INSTALLATION FILES (type net install xttest2)
            xttest2.ado
            xttest2.hlp
            Regards
            --------------------------------------------------
            Attaullah Shah, PhD.
            Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
            FinTechProfessor.com
            https://asdocx.com
            Check out my asdoc program, which sends outputs to MS Word.
            For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

            Comment


            • #7
              Ok, I already know how to correct heteroskedasticity, but I'm still not sure how to formally test it (i.e. diagnose) in random effects model. Is there an equivalent method to wald test (which is applicable to fixed effects) for random effects?

              Comment


              • #8
                Kate:
                There's no need to combine cluster and robust standard errors under a panel framework. In fact you can use -cluster- and -robust- option interchangeably.
                It is worth noting that this feature does not work for cross-sectional regression commands, such as -regress-.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment

                Working...
                X