Announcement

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

  • Panel data homoskedascity too many values problem tabulate problem

    Dear all,

    I have a problem. I have some panel data and would like to check whether my assumption of homoskedasticity is violated or not. To do so, I need to predict the residuals and then tabulate them by my entity variables.

    following code:
    // Run the regression model
    xtreg Y X1, fe

    // Predict the residuals
    predict residual , e

    // Tabulate residuals by entity variables
    tabulate entity_var1 , summarize(res)

    But state outputs me that i have too many values ? Is there any solution / different code i could apply here ?

    Because if those are indeed heteresokedastic i would wan to cluster them :
    xtreg Y X1, fe vce(cluster entity_var1)

    Thank you

  • #2
    Olivia, a couple of things. It isn't just heteroskedasticity that would cause you to cluster; so would serial correlation. You should just cluster and leave it at that. Second, you're not checking for the right kind of heteroskedasticity. It doesn't matter if the variance changes with unit. What matters is whether the heteroskedasticity is a function of the X variables, and you're not testing that. But, again, I would just cluster and then you know both heteroskedasticity and serial correlation are covered.

    Comment

    Working...
    X