Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Predicted Odds Following Logistic Regression


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: Predicted Odds Following Logistic Regression
Date   Sun, 16 Jan 2011 11:06:21 +0000 (GMT)

--- On Sat, 15/1/11, Melissa King wrote:
> I am using logistic regression to estimate how about ten
> independent variables, including four different medical
> services, impact a person’s odds of hospital admission.
> Some of the medical services turn out to have a strong
> and statistically significant impact on hospital
> admission. For example, the odds ratio estimated for
> SERVICE1 is 0.044, which I interpret as meaning that
> those who receive SERVICE1 have a 96 percent decrease in
> odds of hospital admission.
> 
> After running the logistic regression, I used – adjust
> – to display the predicted odds of inpatient admission
> for SERVICE1:
> 
> adjust, by (SERVICE1) exp
> 
> The following results are returned:
> 
> SERVICE1
> 0 = 1.29
> 1 = .48
> 
> Based upon the predicted odds returned by adjust, switching
> from SERVICE1 = 0 to SERVICE1 = 1 does not appear to result
> in a 96 percent decrease in odds of hospital admission. The
> decrease in odds appears to be far less.

Right now you are getting the odds of hospital addmision for
each group while leaving the other variables as is. So part
of the difference you see is due differences in other 
variables. So if you have a control variable age, and those
who receive service1 are much older than those who do not 
receive service1, than the difference in the odds you have
seen is in part due to the age difference. If you fix the 
other variables, then you'll get exactly the same odds ratios 
as in -logit-. It does not matter at which values you fix the 
other values, you will always get the same odds ratio (but of 
course different odds).

*---------------- begin example ------------------
sysuse auto, clear
gen good = rep78 > 3 if rep78 < .
logit foreign good mpg price, or

// if we fix mpg and price at their mean
// the odds ratio reported by -logit-
// corresponds with the ratio of odds
// we get with -adjust-.
preserve
adjust mpg price, by(good) exp replace
list good exp
di exp[2]/exp[1]
restore

// same is true when we fix mpg and price
// at other values, for example I am fixing
// them below at the maximum value
sum mpg if e(sample), meanonly
local mpg_max = r(max)
sum price if e(sample), meanonly
local price_max = r(max)

preserve
adjust mpg=`mpg_max' price=`price_max', by(good) exp replace
list good exp
di exp[2]/exp[1]
restore

// However, if we do not fix mpg and price 
// at a specific value, they will be left as
// is, and the difference between good and 
// bad cars will be in part due to differences
// in their price and mpg
preserve
adjust, by(good) exp replace
list good exp
di exp[2]/exp[1]
restore
*------------------- end example -----------------------
(For more on examples I sent to the Statalist see: 
http://www.maartenbuis.nl/example_faq )

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index