Announcement

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

  • Fixed effects - dealing with (groupwise) heteroskedasticity and serial correlation

    Hi all,

    I'm currently writing my thesis and I have some questions about my fixed effects model.

    My sample contains data from roughly 150 countries over 24 years. I have spend the past days figuring out what stata command to use to find consistent results, but I have not find a satisfying answer yet. I have to add both country and time invariant effects to eliminate these effects. So far, I have added dummy variables for the years and let stata add the country invariant effect by using xtreg.

    I have read things about xtreg, xtpcse, xtregar, prais, xttest2, xttest3 and came across potential problems (e.g. serial correlation, autocorrelation, heteroskedasticity, groupwise heteroskedasticy) At this point, it is not exactly clear to me what command I should use to tackle the problems that are listed above.

    I have used the xtserial command to detect serial correlation and found that my data is subject to this.

    My question is: what command is appropriate in this case? How can I control for the serial correlation? Do I have to / how can I test for autocorrelation, heteroskedasticity and groupwise heteroskedasticity? Should I potentially use a first difference estimation to see whether my fixed effects results are very sensitive? Finally, have I overlooked anything?



    Thanks in advance!

    Greetings from Holland,

    Koen

  • #2
    Hi Koen,

    I am no expert in time series, so I am not fully up to snuff on autocorrelation issues. That said, according to my understanding of it, the consequence of autocorrelation is biased standard errors. As a first pass, I would say to cluster your standard errors at the country level. On a related note, it is almost always a good idea to vary your specifications to see how sensitive your results are.

    If nothing else, this response should bump your post up to the top so (hopefully) a time series expert can give you a more thorough answer.

    Josh

    Comment


    • #3
      Koen:
      I would also take a look at Example 3: Fixed-effects models with robust standard errors under -xtreg- entry in Stata 13.1 .pdf manual.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Hi, Koen,
        I think "xtscc" command might be useful.

        http://www.stata-journal.com/article...article=st0128


        Best,
        wanhaiyou


        Comment


        • #5
          First of all, thank you for fast your responses.

          Still, I have a few questions left.
          To give you a better idea of my thesis subject:
          I am studying the effect of openess to trade (measured by (imports+exports)/GDP) on carbon emissions. I am particularly interested whether this effect changes with income. My hypothesis is that when it becomes more easy to trade (openess to trade increases), high income countries will import rather than produce pollution intensive products. Emissions in middle income countries will therefore rise, since they now produce pollution intensive products for high income countries. N = 150, T = 24.

          It is essential to correct for both country and time invariant effects, so I would say it is obvious I should use fixed effects.

          If I understand correctly, using "xtreg, fe vce(robust)"; I have both heteroskedasticity and serial correlation robust standard errors. Before I use this, do I have to test whether my sample has one of these problems? Does taking the natural logarithm of my variables add anything to this discussion?
          Additionally, what is the rationale behind for instance the Cochrane-Orcutt transformation? My core paper (Heil & Selden, 2001, p. 41) uses this transformation to correct for serial correlation, but it seems way more devious to me than simply using vce(robust)

          Second, what does the xtscc add to this discussion? Does this correct for possible correlation between countries (for example: European countries show some correlation, due to cultural similarities)?

          I hope you can give me some clarity.

          Thanks in advance!

          Koen
          Last edited by Koen Crolla; 11 Jun 2015, 02:38.

          Comment


          • #6
            Hi, Koen,

            Code:
            It is essential to correct for both country and time invariant effects, so I would say it is obvious I should use fixed effects
            No. Random effect model also take account into heterogeneity. The essential difference is that whether the independent variables (X) are correlation with
            individual effect (alpha_i). If E(X*alpha_i) is not equal to zero, you should use fixed effect model. Hausman test can be used to choose between fixed or random effect.


            Code:
            Second, what does the xtscc add to this discussion? Does this correct for possible correlation between countries (for example: European countries show some correlation, due to cultural similarities)?
            Yes. Compare with xtreg,vce(robust) or vce(cluster paneid), xtscc also can correct for cross-sectional dependence. You can see this point more detail
            in the paper "Robust standard errors for panel - Stata Journal". To test for cross-sectional dependence, you can use the "xtcsd" or "xtcd" routine.
            Also, you can test whether or not serial correlation using "xtserial" routine

            Best regards,
            wanhaiyou

            Comment


            • #7
              Koen:
              wanhaiyou has already touched on some relevant issues.
              As an aside, I would only add that -hausman- does not support vce(robust) standard errors.
              Kind regards,
              Carlo
              (Stata 19.0)

              Comment


              • #8
                Thanks again for your responses.

                I have tested for cross-sectionel dependence and found that it was absent. However, I have serial correlation in my sample. Can I simply correct this by either using xtreg vce(robust) or xtreg vce(cluster) (those two commands give me the same results), or do I need to transform my data by using for instance Cochrane-Orcutt? I guess the confusing comes from the terms autocorrelation and serial correlation, is there a difference in controlling for these phenomenons?

                @wanhaiyou: after Hausman test, FE seems best.
                Last edited by Koen Crolla; 11 Jun 2015, 05:05.

                Comment


                • #9
                  Koen:
                  under panel setting, -vce(robust)- and -vce(cluster panelid)- will give you the same results.
                  There's no practical difference in controlling for autocorrealtion and serial correlation, as they are considered synonyms (please, see http://financetrain.com/serial-corre...tocorrelation/).
                  Kind regards,
                  Carlo
                  (Stata 19.0)

                  Comment


                  • #10
                    Agree with Carlo. Autocorrelation and serial correlation are the same. In addition, I think you don't need to transform data by using Cochrane-Orcutt.
                    As regard to Cochrane-Orcutt, your can see the "prais" routine.

                    Best regards,
                    wanhaiyou

                    Comment

                    Working...
                    X