SPSS Textbook Examples
Applied Logistic Regression, Second Edition, by Hosmer and Lemeshow
Chapter 2: Multiple Logistic Regression
page 32 Table 2.1 An example of the coding of the design variables for
race, coded at three levels.
get file='lowbwt.sav'.
recode race (2=1) (else=0) into race2.
recode race (3=1) (else=0) into race3.
execute.
list race race2 race3
/ cases=from 1 to 3.
RACE RACE2 RACE3
2.00 1.00 .00
3.00 .00 1.00
1.00 .00 .00
Number of cases read: 3 Number of cases listed: 3
page 36 Table 2.2 Estimated coefficients for a multiple logistic regression
model using the variables age, weight at last menstrual period (lwt),
race and
number of first trimester physician visits from the low birth weight study.
LOGISTIC REGRESSION VAR=low
/METHOD=ENTER age lwt race2 race3 ftv
/PRINT=SUMMARY.
Case Processing Summary
| Unweighted Cases(a) |
N |
Percent |
| Selected Cases |
Included in Analysis |
189 |
100.0 |
| Missing Cases |
0 |
.0 |
| Total |
189 |
100.0 |
| Unselected Cases |
0 |
.0 |
| Total |
189 |
100.0 |
| a If weight is in effect, see classification table for the total number of cases.
|
Dependent Variable Encoding
| Original Value |
Internal Value |
| .00 |
0 |
| 1.00 |
1 |
Classification Table(a,b)
|
Predicted |
| < 2500g |
Percentage Correct |
| Observed |
.00 |
1.00 |
| Step 0 |
< 2500g |
.00 |
130 |
0 |
100.0 |
| 1.00 |
59 |
0 |
.0 |
| Overall Percentage |
|
|
68.8 |
| a Constant is included in the model. |
| b The cut value is .500
|
Variables in the Equation
|
B |
S.E. |
Wald |
df |
Sig. |
Exp(B) |
| Step 0 |
Constant |
-.790 |
.157 |
25.327 |
1 |
.000 |
.454 |
Variables not in the Equation
|
Score |
df |
Sig. |
| Step 0 |
Variables |
AGE |
2.674 |
1 |
.102 |
| LWT |
5.438 |
1 |
.020 |
| RACE2 |
1.727 |
1 |
.189 |
| RACE3 |
1.797 |
1 |
.180 |
| FTV |
.749 |
1 |
.387 |
| Overall Statistics |
11.388 |
5 |
.044 |
Omnibus Tests of Model Coefficients
|
Chi-square |
df |
Sig. |
| Step 1 |
Step |
12.099 |
5 |
.033 |
| Block |
12.099 |
5 |
.033 |
| Model |
12.099 |
5 |
.033 |
Model Summary
| Step |
-2 Log likelihood |
Cox & Snell R Square |
Nagelkerke R Square |
| 1 |
222.573 |
.062 |
.087 |
Classification Table(a)
|
Predicted |
| < 2500g |
Percentage Correct |
| Observed |
.00 |
1.00 |
| Step 1 |
< 2500g |
.00 |
125 |
5 |
96.2 |
| 1.00 |
54 |
5 |
8.5 |
| Overall Percentage |
|
|
68.8 |
| a The cut value is .500
|
Variables in the Equation
|
B |
S.E. |
Wald |
df |
Sig. |
Exp(B) |
| Step 1(a) |
AGE |
-.024 |
.034 |
.499 |
1 |
.480 |
.976 |
| LWT |
-.014 |
.007 |
4.741 |
1 |
.029 |
.986 |
| RACE2 |
1.004 |
.498 |
4.066 |
1 |
.044 |
2.729 |
| RACE3 |
.433 |
.362 |
1.430 |
1 |
.232 |
1.542 |
| FTV |
-.049 |
.167 |
.087 |
1 |
.768 |
.952 |
| Constant |
1.295 |
1.071 |
1.461 |
1 |
.227 |
3.651 |
| a Variable(s) entered on step 1: AGE, LWT, RACE2, RACE3, FTV.
|
page 38 Table 2.3 Estimated coefficients for a multiple logistic regression
model using the variables lwt and race from the low birth weight study.
LOGISTIC REGRESSION VAR=low
/METHOD=ENTER lwt race2 race3.
Case Processing Summary
| Unweighted Cases(a) |
N |
Percent |
| Selected Cases |
Included in Analysis |
189 |
100.0 |
| Missing Cases |
0 |
.0 |
| Total |
189 |
100.0 |
| Unselected Cases |
0 |
.0 |
| Total |
189 |
100.0 |
| a If weight is in effect, see classification table for the total number of cases.
|
Dependent Variable Encoding
| Original Value |
Internal Value |
| .00 |
0 |
| 1.00 |
1 |
Classification Table(a,b)
|
Predicted |
| < 2500g |
Percentage Correct |
| Observed |
.00 |
1.00 |
| Step 0 |
< 2500g |
.00 |
130 |
0 |
100.0 |
| 1.00 |
59 |
0 |
.0 |
| Overall Percentage |
|
|
68.8 |
| a Constant is included in the model. |
| b The cut value is .500
|
Variables in the Equation
|
B |
S.E. |
Wald |
df |
Sig. |
Exp(B) |
| Step 0 |
Constant |
-.790 |
.157 |
25.327 |
1 |
.000 |
.454 |
Variables not in the Equation
|
Score |
df |
Sig. |
| Step 0 |
Variables |
LWT |
5.438 |
1 |
.020 |
| RACE2 |
1.727 |
1 |
.189 |
| RACE3 |
1.797 |
1 |
.180 |
| Overall Statistics |
10.757 |
3 |
.013 |
Omnibus Tests of Model Coefficients
|
Chi-square |
df |
Sig. |
| Step 1 |
Step |
11.413 |
3 |
.010 |
| Block |
11.413 |
3 |
.010 |
| Model |
11.413 |
3 |
.010 |
Model Summary
| Step |
-2 Log likelihood |
Cox & Snell R Square |
Nagelkerke R Square |
| 1 |
223.259 |
.059 |
.082 |
Classification Table(a)
|
Predicted |
| < 2500g |
Percentage Correct |
| Observed |
.00 |
1.00 |
| Step 1 |
< 2500g |
.00 |
124 |
6 |
95.4 |
| 1.00 |
53 |
6 |
10.2 |
| Overall Percentage |
|
|
68.8 |
| a The cut value is .500
|
Variables in the Equation
|
B |
S.E. |
Wald |
df |
Sig. |
Exp(B) |
| Step 1(a) |
LWT |
-.015 |
.006 |
5.587 |
1 |
.018 |
.985 |
| RACE2 |
1.081 |
.488 |
4.906 |
1 |
.027 |
2.948 |
| RACE3 |
.481 |
.357 |
1.816 |
1 |
.178 |
1.617 |
| Constant |
.805 |
.845 |
.908 |
1 |
.341 |
2.238 |
| a Variable(s) entered on step 1: LWT, RACE2, RACE3.
|
page 42 Table 2.4 Estimated covariance matrix of the estimated coefficients
in Table 2.3.
LOGISTIC REGRESSION VAR=low
/METHOD=ENTER lwt race2 race3
/PRINT=SUMMARY corr.
Case Processing Summary
| Unweighted Cases(a) |
N |
Percent |
| Selected Cases |
Included in Analysis |
189 |
100.0 |
| Missing Cases |
0 |
.0 |
| Total |
189 |
100.0 |
| Unselected Cases |
0 |
.0 |
| Total |
189 |
100.0 |
| a If weight is in effect, see classification table for the total number of cases.
|
Dependent Variable Encoding
| Original Value |
Internal Value |
| .00 |
0 |
| 1.00 |
1 |
Classification Table(a,b)
|
Predicted |
| < 2500g |
Percentage Correct |
| Observed |
.00 |
1.00 |
| Step 0 |
< 2500g |
.00 |
130 |
0 |
100.0 |
| 1.00 |
59 |
0 |
.0 |
| Overall Percentage |
|
|
68.8 |
| a Constant is included in the model. |
| b The cut value is .500
|
Variables in the Equation
|
B |
S.E. |
Wald |
df |
Sig. |
Exp(B) |
| Step 0 |
Constant |
-.790 |
.157 |
25.327 |
1 |
.000 |
.454 |
Variables not in the Equation
|
Score |
df |
Sig. |
| Step 0 |
Variables |
LWT |
5.438 |
1 |
.020 |
| RACE2 |
1.727 |
1 |
.189 |
| RACE3 |
1.797 |
1 |
.180 |
| Overall Statistics |
10.757 |
3 |
.013 |
Omnibus Tests of Model Coefficients
|
Chi-square |
df |
Sig. |
| Step 1 |
Step |
11.413 |
3 |
.010 |
| Block |
11.413 |
3 |
.010 |
| Model |
11.413 |
3 |
.010 |
Model Summary
| Step |
-2 Log likelihood |
Cox & Snell R Square |
Nagelkerke R Square |
| 1 |
223.259 |
.059 |
.082 |
Classification Table(a)
|
Predicted |
| < 2500g |
Percentage Correct |
| Observed |
.00 |
1.00 |
| Step 1 |
< 2500g |
.00 |
124 |
6 |
95.4 |
| 1.00 |
53 |
6 |
10.2 |
| Overall Percentage |
|
|
68.8 |
| a The cut value is .500
|
Variables in the Equation
|
B |
S.E. |
Wald |
df |
Sig. |
Exp(B) |
| Step 1(a) |
LWT |
-.015 |
.006 |
5.587 |
1 |
.018 |
.985 |
| RACE2 |
1.081 |
.488 |
4.906 |
1 |
.027 |
2.948 |
| RACE3 |
.481 |
.357 |
1.816 |
1 |
.178 |
1.617 |
| Constant |
.805 |
.845 |
.908 |
1 |
.341 |
2.238 |
| a Variable(s) entered on step 1: LWT, RACE2, RACE3.
|
Correlation Matrix
|
Constant |
LWT |
RACE2 |
RACE3 |
| Step 1 |
Constant |
1.000 |
-.958 |
.055 |
-.343 |
| LWT |
-.958 |
1.000 |
-.206 |
.155 |
| RACE2 |
.055 |
-.206 |
1.000 |
.306 |
| RACE3 |
-.343 |
.155 |
.306 |
1.000 |
NOTE: for the variances: var=(se)**2
NOTE: for the covariances: cov=corr*se*se
lwt/lwt: (.006)**2 = .00036
lwt/race2: (.006)*(.488)*(-.206) = -.000603168
lwt/race3: (.006)*(.357)*(.155) = .00033201
lwt/constant: (.006)*(.845)*(-.958) = -.00485706
race2/race2: (.488)*2 = .238144
race2/race3: (.488)*(.357)*(.306) = .053310096
race2/constant: (.488)*(.845)*(.055) = .0226798
race3/race3: (.357)**2 = .127449
race3/constant: (.357)*(.845)*(-.343) = -.103471095
constant/constant: (.845)**2 = .714025