Chapter 8 Logistic Regression (Compatibility Mode)
Chapter 8 Logistic Regression (Compatibility Mode)
Logistic Regression
Rather than dealing with a single age data with binary outcomes,
let us group the age data so that we can get proportions
(probabilities) of success (1s) at different age groups
20 - 29 5 0 0
30 - 39 6 1 0.17
40 - 49 7 2 0.29
50 - 59 7 4 0.57
60 - 69 5 4 0.80
70 - 79 2 2 1.00
80 - 89 1 1 1.00
Logistic regression cont…
The probabilities in the above table are the same as the
proportions of individuals with CHD in each age category.
1
Sign of coronary disease
(Yes )
1.0
0.8
0.6
P = P(y/x) = P(success given x
0.4
occurred) = P(a person is +ve CHD
0.2 given his age is x)
0.0
20 40 60 80 100
e b = Odds Ratio
The linking and transformation process
Yes
Outcome
Pi Start
No
Predictor (group) Predictor (single)
Link function
End
Function:
The (x, p) coordinate on which the slope reaches its pick is (-á/â,
0.5). The value of x at this point is called median effective level
denoted by EL50
Logistic regression cont…
Example on the data given above:
The analysis of logistic regression is computer intensive
After entering the above data using SPSS and running it for
binary logistic regression, the following result has been obtained.
The 95% CI for this estimate (i.e. Odds Ratio) is (1.04, 1.23)
Logistic Regression cont…
Patient satisfaction
p1 p0
b1 ln ln 1.75 0.285 1.465
1 p1 1 p0
SPSS output
95.0% C.I. for EXP(B)
Variable B S.E Wald P-value. Exp(B) Lower Upper
Note that the 95% CI is very wide due to the fact that there is small
sample size used in the analysis (There must be at least 10 ‘yes’s and
10 ‘no’s preferably 20 for each category of each variables
Multiple Logistic Regression output
Unsatisfied
Characteristics Yes No Crude OR Adjusted OR P- Value
(95% CI) (95% CI)
Cost of treatment 0.522
Very cheap 59 69 1.0 1.0
Cheap 70 42 1.95 (1.16, 3.27) 1.36 (0.66 2.81) 0.400
Moderate 30 8 4.39(1.87, 10.30) 2.12 (0.64, 7.05) 0.220
Expensive 97 41 2.77(1.67, 4.58) 1.54(0.73, 3.26) 0.255
Highly expensive 47 11 5.00(2.38, 10.50) 2.35 (0.74, 7.53) 0.150
Residence
Urban 205 154 1.0 1.0
Rural 98 17 4.33 (2.48, 7.55) 2.71 (1.19, 6.16) 0.017*
Extra job < 0.001**
Goven’t worker 19 13 1.0 1.0
Need partime 210 58 2.48 (1.16, 5.31) 3.18(1.09, 9.06) 0.034
Partimer 60 96 0.43 (0.20, 0.93) 1.04(0.35, 3.15) 0.94
Has his own firm 14 4 2.40 (0.64, 8.93) 6.26 (3.21, 32.27) 0.028
Diagnosis Type
Complex 108 154 1.0 1.0
Simple 195 17 16.36 (9.41, 28.44) 13.55 (6.96, 26.37) <0.001**