/CRITERIA METHOD¼FISHER(1) SCALE¼1 COVB¼MODEL MAXITERATIONS¼ 100
MAXSTEPHALVING¼ 5
PCONVERGE¼1E-006(ABSOLUTE) SINGULAR¼1E-012 ANALYSISTYPE¼3(WALD)
CILEVEL¼ 95
CITYPE¼WALD
LIKELIHOOD¼FULL
/MISSING CLASSMISSING¼EXCLUDE
/PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION.
Obtaining ROC Curves
The ROC procedure will produce ROC curves in SPSS. If we wish to use predicted
probabilities from a logistic regression as cutpoints for an ROC curve, we must first
run a logistic regression and save the predicted probabilities in our working dataset.
Then we can use the ROC procedure. This will be demonstrated with the knee
fracture dataset.
Open the datasetkneefr.sav inthe Data Editor window. The corresponding com-
mand syntax is:
GET
FILE¼‘C:\kneefr.sav’.
The outcome variable is FRACTURE indicating whether the subject actually had a
knee fracture. The model follows:
logit PðFRACTURE¼ 1 jXÞ¼b 0 þb 1 AGECATþb 2 HEADþb 3 PATELLAR
þb 4 FLEXþb 5 WEIGHT
To run the LOGISTIC REGRESSION procedure, select Analyze!Regression!
Binary Logistic from the drop-down menus to reach the dialog box to specify the
logistic model. Select FRACTURE from the variable list and enter it into the Depen-
dent Variable box, then select and enter the covariates AGECAT, HEAD, PATELLAR,
FLEX, and WEIGHT into the Covariate(s) box. Click on SAVE to create a new
variable in the knee fracture dataset. Check the box called “Probabilities” under the
heading “Predicted Values.” Select CONTINUE and then click on OK to run the
model. A new variable called PRE_1 will appear in the working dataset containing
each individual’s predicted probability. These predicated probabilities are used to
help generate the ROC curve.
The two key variables for producing an ROC curve using a logistic regression are the
predicated probabilities (called PRE_1 in this example) and the observed dichoto-
mous outcome variable (called FRACTURE in this example). To obtain an ROC curve
select Analyze!ROC Curve, then select the variable Predicted probability (PRE_1)
in the box called “Test Variable” and select the outcome variable FRACTURE in the
box called “State Variable.” Type the value 1 in the box called “Value of State
Variable” since FRACTURE¼1 indicates a fracture event. Click on OK to obtain
the ROC curve.
640 Appendix: Computer Programs for Logistic Regression