Announcement

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

  • Estimating model residuals after xtpoisson

    Hello all,

    After xtpoisson, I liked to estimate the model residuals. However, the command, predict lpuhat, residual, did not work for the poisson model. Please advise me on how to estimate model residuals after xtpoisson. Thank you.

  • #2
    You do not say, but I am guessing that you used -xtpiosson, fe-. In that case it is not possible to predict residuals. The reason is that -xtpoisson, fe- conditions on the fixed effects, it does not estimate them. Consequently, it cannot be used to get predicted values for the outcome variable (and therefore not of the residuals either) because the fixed effects part is missing. The closest you can come to it is -predict nu0, nu0-, which gives you the estimated outcome variable conditional upon the fixed effect being 0. You could then get a "residual" by subtracting nu0 from the observed n. But these are not true residuals, and I doubt they would be of much use.

    Perhaps if you explain why you want to calculate the residuals, it might be possible to suggest how you might accomplish that goal using statistics that can actually be calculated.

    Comment

    Working...
    X