To give this pot another stir, and to use
mutually accessible data, -logit- and -glm-
with logit link and binomial family give quite
different deviance residuals.
The pattern of -glm-'s makes sense,
but that of -logit-'s is more puzzling.
Something's wrong here; is it my understanding?
sysuse auto, clear
logit foreign mpg
predict logitdev, dev
glm foreign mpg, link(logit) f(binomial)
predict glmdev, dev
scatter *dev
scatter logitdev mpg, mlabel(foreign)
scatter glmdev mpg, mlabel(foreign)
Interesting. I'll also add that the deviance residuals produced by Stata's
glm are identical to Spss's deviance residuals. Obviously, the deviance
residual is calculated differently in Stata's -logistic- and -glm-
routines, although I am not seeing anything in the manuals that indicates
that that is the case. Either (a) Stata is being a lot smarter than I am,
and knows better or at least alternative ways of calculating residuals, or
(b) perhaps there is a mistake in Stata??? Intuitively, the residuals
reduced by Stata's -glm- and by SPSS seem more useful to me, i.e. the value
of a residual should not be the same regardless of what the actual outcome was.