Announcement

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

  • Residuals after xtreg provided random effects?

    Hey everyone,

    I need to be spotting outliers in my data and I have a panel. I don't know how to go about it. For fixed effects, I can be running a LSDV and then get studentized residuals or look at cook's d to spot outliers etc. But what do I do if my model is a random effects?

    Also, is there any command to get residuals after xtreg?

    Thank you

  • #2
    You can get the random effects with -predict random_effect_varname, u- and the bottom-level residuals with -predict residual_varname, -e-.

    Comment


    • #3
      Dear Clyde,

      Thank you for your reply. It maybe a trivial question but would you know which residuals should I be looking at to spot outliers out of the two you mentioned?

      Secondly, how can I get the standard error of my residuals after xtreg?

      Thank you

      Comment


      • #4
        The term "outlier" isn't well defined in the context of panel data (or other repeated-measures data). A panel whose value of u is large in magnitude is an outlier panel as a whole. An observation whose value of e is large in magnitude is an outlier relative to its panel. Note that if you had a panel which is an outlier as a whole in one direction, you could have an observation in that panel which is an outlier in the opposite direction relative to its panel and the observation as a whole could have a total u+e of, or close to, 0!

        Some of the simple checks that are often applied after a simple linear regression do not easily generalize to this situation.

        If you want the standard deviation of your residuals, just use -summarize- as you would with any other variable. I don't know of any way to get a standard error of a residual and I'm not even sure the idea is meaningful.

        Comment

        Working...
        X