Announcement

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

  • Autocorrelation and Heteroskedasticity issue

    hi, i have panel data of 22 cities with 17 years, and i used log transformations for my variables in xtreg , after carrying out the hausman test to decide between Random- effect or Fixed-effect model, the result was that Fixed effect model would be better. After this, I applied some tests to verify problems of heteroskedasticity, autocorrelation such as:

    xttest2 (Breusch-Pagan statistic for cross-sectional independence in the residuals)
    xttest3 (heteroskedasticity)
    xtcsd, pesaran abs (cross sectional independence)

    it turned out that my data has both autocorrelation and heteroskedasticity , how can i deal with it?
    Attached Files

  • #2
    Jeevan:
    just invoke -cluster- or -robust- options (they do the very same job under -xtreg-) for standard errors to take both heteroskedasticity and autocorrelation into account.
    After that, you cannot use -hausman- anymore to compare -fe- vs -re- specification (as -hausman- does not support non-default standard errors) but you have to switch to the community-contributed programme -xtoverid- (just type -search xtoverid- to spot and install it).
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      thanks Carlo, I invoked the robust in my code but the wald chi2 statistics are missing. and can i perform normality test for panel data as a diagnosis test?

      Comment


      • #4
        Jeevan:
        as fas as the unreported chi2 statistic is concerned, see -help j_robustsingular-.
        Normality is a (weak) requirement for residuals distribution only.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Ok Carlo.even after using robust in code autocorrelation and heteroskedasticity tests shown that still my models have them. Then I used xtgls ( n=22, t= 17) where it generated that it does not have heteroskedasticity or autocorrelation but can i avoid R square values in gls model.

          Comment


          • #6
            Jeeven:
            it does not make any sense to test for heteroskedasticity and/or autoccorrelation when you imposed non-default standard errors, as the result of the tests will not change (because they work on residuals, that remain unchanged when you switch from default to non-default standard errors).
            That said, -xtgls- sounds sensible here, because your T dimension is not negligible.
            Hovever, -xtgls- does not allow to investigate fixed effect (see -xtregar-, instead).
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Ok Carlo, i ran xtregar but with in r squares values are very low (0.3954) and rho ar values is 0.68 and how can i interpret r square values in xtgls?

              Comment


              • #8
                Jeevan:
                I would not say that your within Rsq is low, not tah rho is negligible .
                Unfortunately, -xtgls- does not return Rsq but -chi2- statistic.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment

                Working...
                X