ROC curve
Plots sensitivity against 1 − specificity for every cut-off of a test score, with the area under the curve (AUC), its standard error and 95% confidence interval.
Menu: Graphs → More charts → ROC curve…
When should I use it?
- Judging how well a score separates two groups (e.g. diseased / healthy).
- Choosing a cut-off (Youden’s J).
What are the assumptions?
- A numeric test variable; a state variable with the positive group coded.
How do I run it in StatLab?
- Choose the test variable(s) and the state variable.
- Say which code means positive.
How do I read the output?
| Output | Meaning |
|---|---|
| Curve | Higher and further left is better. |
| AUC | 0.5 = no better than chance; 1 = perfect. |
Worked example
On the practice survey dataset (File → Sample dataset), this command — which the dialog's Paste button also produces — runs the procedure:
PROC vizROC /vars=(score age) /state=group /positive=max /youden=NO.
Output tables: Area Under the Curve.
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?
- Getting the positive code wrong (AUC below 0.5 usually means this).