[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: Residuals in Logistic Regression
At 06:55 PM 4/9/2004 +0100, Nick Cox wrote:
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.
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 logitdev mpg, mlabel(foreign)
scatter glmdev mpg, mlabel(foreign)
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc
* For searches and help try: