Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Residuals in Logistic Regression


From   Richard Williams <[email protected]>
To   [email protected], <[email protected]>
Subject   RE: st: Residuals in Logistic Regression
Date   Fri, 09 Apr 2004 13:52:49 -0500

At 06:55 PM 4/9/2004 +0100, Nick Cox wrote:
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.


-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: [email protected]
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index