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]
Subject   Re: st: Residuals in Logistic Regression
Date   Fri, 09 Apr 2004 12:39:56 -0500

At 09:26 AM 4/9/2004 -0500, Richard Williams wrote:

I obviously don't understand how the residual statistics work in logistic regression. I have run a logistic regression of happymar (coded 0, 1) on church and female (also both 0, 1) and educ (years of education). I then use predict to get the deviance residuals (I get similar results if I use the rstandard or residuals options on predict). I get the following:

. extremes dev p happymar church female educ, nolabel high

+----------------------------------------------------------------+
| obs: dev p happymar church female educ |
|----------------------------------------------------------------|
| 43. 1.170689 .5039612 1 1 0 10 |
| 2. 1.394511 .3782007 1 0 1 10 |
| 6. 2.4859 .0858805 0 0 0 11 |
| 13. 2.4859 .0858805 1 0 0 11 |
| 36. 2.4859 .0858805 1 0 0 11 |
+----------------------------------------------------------------+
To follow up on my own message: I ran the same logistic regression in SPSS, and its residuals statistics behave as I would expect, i.e. case 6 is not an outlier but cases 13 and 36 are. As far as I can tell, with Stata's logistic regression, the residuals produced by the -deviance-, -rstandard-, and -deviance- parameters on -predict- will all be the same for cases that have the same values on the covariates, regardless of whether they have the same value on the outcome measure. I imagine there is a logic behind this, but I don't know what it is, and it is not the same logic used by SPSS in computing residuals.

*
* 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