Announcement

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

  • Correcting for heteroskedasticity in a panel dataset

    Hello everyone,

    I am trying to find the impact of financial risk on financial performance of a panel of Zimbabwe commercial banks. I used Pagan - Hall test approach as well as White test and Groupwise test as statistical approaches to investigate the homoscedasticity of the model itself. The p value I obtained from Pagan - Hall, White test and Groupwise test (Modified wald test) is less than 0.05
    . ivhettest
    OLS heteroskedasticity test(s) using levels of IVs only
    Ho: Disturbance is homoskedastic
    White/Koenker nR2 test statistic : 20.259 Chi-sq(8) P value = 0.0094
    Given the above. How do l correct for heteroskedasticity ? What commands should l use?

  • #2
    If you have \(N>>T\), then cluster robust standard errors are robust to the presence of heteroscedasticity and arbitrary forms of serial correlation. See Stock and Watson (2008).

    Code:
    xtset panelvar year
    xtreg yvar xvars i.year, fe cluster(panelvar)
    where "panelvar" is your panel identifier.


    Reference:
    Stock, J. H., and M. W. Watson. 2008. Heteroskedasticity-robust standard errors for fixed effects panel data regression. Econometrica 76: 155–174. https://doi.org/10.1111/j.0012-9682.2008.00821.x.

    Comment


    • #3
      Hi Andrew,

      l am new to Stata. Can you take me through what the code should be like give l have 9 variables (N) and time 7 years (T). My dependent variable is ROE and independent variables are LIQ, CRED, CAR, CAPR, EXCH, FINS, INFL and OPRIS

      Comment


      • #4
        Just to be precise, N is not the number of variables you have but the number of units (I presume in your case firms).

        Code:
        xtreg [depvar] [indep. variables], fe cluster(firmID)

        Comment


        • #5
          El:
          like Andrew, I would also add -i.year- in the right-hand side of your regression equation.
          Just a word of advice: get yourself familiar with the building blocks of panel data regression via any decent textbook on this topic.
          In addition -xtreg- entry, Stata .pdf manual is a valuable source to start with.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            Originally posted by El Mkwara View Post
            Hi Andrew,

            l am new to Stata. Can you take me through what the code should be like give l have 9 variables (N) and time 7 years (T). My dependent variable is ROE and independent variables are LIQ, CRED, CAR, CAPR, EXCH, FINS, INFL and OPRIS
            As the previous replies suggest

            Code:
            xtset firm year
            xtreg ROE LIQ CRED CAR CAPR EXCH FINS INFL OPRIS i.year, fe cluster(firm)
            This assumes that your number of firms \(N> 30\). If you have less than 30 firms, then the cluster robust standard errors may be biased due to a small number of clusters.

            Comment

            Working...
            X