ROC curve
Shows how well a score separates positive from negative cases across all cut-offs; the area under the curve (AUC) summarises it.
Menu: Analyze → Classify → ROC Curve…
When should I use it?
- Evaluating a screening test or risk score.
- Choosing a cut-off (Youden's index).
What are the assumptions?
- A known true state for each case.
How do I run it in StatLab?
- Choose the test variable(s), the state variable and the value that means positive.
- Untick 'Larger test result…' if lower scores indicate a positive state.
- With two or more test variables, tick 'Pairwise comparison' to test whether their AUCs differ (DeLong).
How do I read the output?
| Output | Meaning |
|---|---|
| Area | 0.5 = no better than chance, 1 = perfect. |
| Std. Error, 95% CI, Asymptotic Sig. | Uncertainty and the test of AUC = 0.5. |
| Coordinates | Sensitivity and 1 − specificity at each cut-off; Youden's J = sensitivity + specificity − 1. |
| AUC Difference, z, Sig. | Test of two correlated AUCs measured on the same cases. |
Worked example
On the practice survey dataset (File → Sample dataset), this command — which the dialog's Paste button also produces — runs the procedure:
PROC rocCurve /vars=(score) /state=smoker /larger=YES /se=hm /coords=YES /compare=NO /positive=1.
Output tables: Case Processing Summary · Area Under the Curve · Coordinates of the Curve — Wellbeing score.
How would I report it in APA style?
The area under the ROC curve for Wellbeing score was .518, 95% CI [.415, .621], p = .726; the best cut-off by Youden's index was 64.541 (sensitivity .87, specificity .25).
Computed by StatLab's validated procedure code when this page was built. The example only illustrates the steps; choose variables that fit your own research question.
What are common mistakes?
- Choosing the wrong positive value, which turns an AUC of .80 into .20.