Suppose you have a short screening scale for depression, and you want to know how well it separates people who meet the diagnostic criteria from people who do not. Any single cut-off score will classify some people correctly and others wrongly, and every cut-off you could choose trades sensitivity against specificity. The ROC curve shows you that trade-off for every possible cut-off at once, and the area under the curve (AUC) gives you one number that summarises how well your test discriminates. In this tutorial, you will learn how to run ROC curve analysis in SPSS, read the sensitivity, specificity and AUC in the output, choose the best cut-off for your test, and report the results in APA style.
What is an ROC curve?
The ROC (receiver operating characteristic) curve plots a test’s sensitivity, the true positive rate, against 1 minus specificity, the false positive rate, at every possible cut-off value of the test score. Each point on the curve is one cut-off. The diagonal line from the bottom-left to the top-right corner is the line of no discrimination: a test that performs no better than chance follows that diagonal. The further the curve bows toward the top-left corner, the better the test discriminates between the two groups.
ROC analysis needs two variables: a test variable, which is the score you are evaluating (usually a continuous or ordinal scale score), and a state variable, which is the true binary outcome (for example, 0 = condition absent, 1 = condition present). The state variable must have exactly two categories.
Sensitivity and specificity, explained
Sensitivity and specificity describe the two kinds of accuracy a test can have. Sensitivity is the proportion of true cases the test correctly identifies. If 100 people have the condition and the test flags 82 of them, sensitivity is .82. Specificity is the proportion of true non-cases the test correctly clears. If 100 people do not have the condition and the test clears 79 of them, specificity is .79.
In formulas:
- Sensitivity = true positives / (true positives + false negatives)
- Specificity = true negatives / (true negatives + false positives)
- 1 − specificity = the false positive rate, plotted on the ROC curve’s horizontal axis
The two measures pull in opposite directions. Lowering the cut-off catches more true cases, so sensitivity rises, but it also flags more healthy people, so specificity falls. The ROC curve makes this trade-off visible, so you can pick a cut-off deliberately instead of guessing.
What the AUC tells you
The area under the curve (AUC) is the single most reported number from an ROC analysis. It ranges from 0.5 to 1.0. An AUC of 0.5 means the test discriminates no better than chance, and an AUC of 1.0 means perfect separation between the groups. A useful way to think about it: the AUC is the probability that a randomly chosen person with the condition scores higher on the test than a randomly chosen person without it.
A commonly used rule of thumb for judging AUC values is 0.5 = no discrimination, 0.7 to 0.8 = acceptable, 0.8 to 0.9 = excellent, and 0.9 and above = outstanding. Treat these as rough guidance, not hard cut-offs. What counts as a good AUC depends on what the test is used for and on the cost of each kind of error: a screening test where missing a case is dangerous needs high sensitivity, while a test that triggers an invasive follow-up needs high specificity.
When to use ROC curve analysis
ROC analysis is the right tool when you need to evaluate how well a score separates two groups. Typical uses include:
- Evaluating a diagnostic or screening test against a known diagnosis
- Finding the best cut-off score for a questionnaire or scale
- Comparing two tests or two predictors to see which discriminates better
- Checking how well a logistic regression model discriminates, by running the ROC curve on its predicted probabilities
It is not suitable when your outcome has more than two categories. For a three-category outcome, a multinomial logistic regression model is the appropriate approach instead. ROC analysis also assumes your observations are independent, so it does not apply to paired or repeated measurements on the same people.
How to run ROC curve analysis in SPSS
Before you start
Check your two variables in Variable View. The test variable must be numeric, and the state variable must be coded with two numeric values, for example 0 for condition absent and 1 for condition present. If your grouping variable is coded with text labels, recode it to 0 and 1 first, because the ROC Curve dialog needs a numeric value for the positive group.
Step-by-step: the ROC Curve dialog
- Go to Analyze > ROC Curve…
- Move your test score into the Test Variable box.
- Move your grouping variable into the State Variable box.
- In the Value of State Variable field, type the code for the positive group, for example 1.
- Under Display, tick ROC Curve, With diagonal reference line, Standard error and confidence interval, and Coordinate points of the ROC Curve.
- Check the test direction (see below), then click OK.
Choosing the test direction
Under Test Direction, SPSS asks whether a larger or a smaller test result indicates a more positive test. If higher scores mean the condition is more likely, keep the default, Larger test result indicates more positive test. If lower scores indicate the condition, choose Smaller test result indicates more positive test. If you pick the wrong direction, your AUC will come out below 0.5. That is the signal to flip the option and run it again.
SPSS syntax
The menu clicks above generate syntax like this. Replace score with your test variable and diagnosis with your state variable:
ROC score BY diagnosis (1) /PLOT CURVE(REFERENCE) /PRINT SE COORDINATES /CRITERIA CUTOFF(INCLUDE) TESTPOS(LARGE) DISTRIBUTION(FREE) CI(95) /MISSING EXCLUDE.
In this syntax, TESTPOS(LARGE) means larger test values indicate the positive group, COORDINATES prints the cut-off table, and CI(95) requests the 95% confidence interval for the AUC. If lower scores indicate the condition, change TESTPOS(LARGE) to TESTPOS(SMALL). Save the syntax with your analysis so the run is fully reproducible.
How to interpret the SPSS output
Case Processing Summary
This first table shows how many positive and negative cases were used, and how many cases were excluded as missing. Check that the counts match your data: a large number of missing cases usually means a coding problem in the state variable.
Area Under the Curve table
This table reports the AUC, its standard error, the asymptotic significance, and the 95% confidence interval. The significance test checks the null hypothesis that the AUC equals 0.5, which is no discrimination. If the confidence interval includes 0.5, your test does not discriminate significantly better than chance. If the interval sits entirely above 0.5, the test discriminates, and the AUC value tells you how well.
Coordinates of the Curve table
This table lists every possible cut-off with its sensitivity and 1 minus specificity. Use it to choose your cut-off. A standard choice is the cut-off that maximises Youden’s index, J, which is calculated as:
Youden’s J = sensitivity + specificity − 1
For each row of the table, add sensitivity and specificity and subtract 1. The cut-off with the largest J gives the best balance between the two kinds of accuracy. The table can be long for a continuous test variable, so sort or scan it for the maximum value rather than reading every row. Keep in mind that Youden’s index treats a false positive and a false negative as equally costly. If missing a case is far worse than a false alarm in your study, you may prefer a cut-off with higher sensitivity even if its J is slightly lower.
The ROC curve plot
The plot is your visual check. A curve that hugs the top-left corner is a strong test; a curve that follows the diagonal is a useless one. Use the plot to sanity-check the AUC number, and keep it for your thesis or report, since readers grasp a curve faster than a table.
Comparing two ROC curves
You can compare two tests in a single run: move both test variables into the Test Variable box and SPSS prints one AUC row per variable in the same table. Compare the AUC values and their confidence intervals. If the intervals do not overlap, the difference in discrimination is clear; if they overlap heavily, the evidence for a difference is weak. Note that the standard ROC Curve dialog does not run a formal statistical test comparing two AUCs, so describe the comparison through the AUCs and their intervals rather than claiming a tested difference.
Reporting ROC results in APA style (7th ed.)
Report the AUC to two decimal places with no leading zero, because AUC is a proportion that cannot exceed 1. Always give the 95% confidence interval and the p value, name the test and the outcome, and report the cut-off you chose with its sensitivity and specificity. A write-up following this pattern, with your own values filled in, looks like this:
The screening scale discriminated between participants with and without the condition, AUC = .86, 95% CI [.78, .93], p < .001. At the optimal cut-off score of 14, sensitivity was .82 and specificity was .79 (Youden’s J = .61).
If you compared two tests, report an AUC, confidence interval and p value for each, then state which discriminated better. If the AUC was not significant, say so plainly: an AUC of .54, 95% CI [.42, .66], p = .61, means the test did not discriminate better than chance in your sample.
Key Takeaways
- The ROC curve plots sensitivity against 1 minus specificity at every possible cut-off, so you can see the full trade-off before choosing one.
- The AUC summarises discrimination in one number: 0.5 is chance, and as a rough guide 0.7 to 0.8 is acceptable, 0.8 to 0.9 excellent, and 0.9 and above outstanding.
- Always check the test direction. An AUC below 0.5 means larger and smaller are reversed, not that the test is worthless.
- Pick the cut-off that maximises Youden’s J, unless the cost of errors in your study argues for favouring sensitivity or specificity.
- Report the AUC, its 95% confidence interval, the p value, the chosen cut-off, and the sensitivity and specificity at that cut-off.
FAQs
What is a good AUC value?
As a rough guide, 0.7 to 0.8 is acceptable, 0.8 to 0.9 excellent, and 0.9 and above outstanding, with 0.5 meaning no discrimination. What counts as good depends on the stakes: a screening test for a serious condition needs to be judged more strictly than a low-stakes classroom measure.
What does an AUC below 0.5 mean?
It almost always means the test direction is reversed: you told SPSS that larger values indicate the condition when smaller values do. Flip the test direction option and run the analysis again. A genuinely below-chance test is rare, and the reversed AUC is simply 1 minus the value you got.
Can I use ROC analysis if my outcome has more than two groups?
No. The state variable in the ROC Curve dialog must be dichotomous. For an outcome with three or more categories, fit a multinomial logistic regression model instead, and evaluate it with classification tables and pseudo R-squared measures.
How do I choose the best cut-off score?
Use the Coordinates of the Curve table and pick the cut-off that maximises Youden’s J, which is sensitivity plus specificity minus 1. Then weigh the real-world costs: if missing a case is dangerous, choose a lower cut-off with higher sensitivity; if a false positive triggers costly or invasive follow-up, choose a higher cut-off with higher specificity.
How is ROC analysis different from logistic regression?
Logistic regression builds a model that predicts a binary outcome from one or more predictors, while ROC analysis evaluates how well a score or a model’s predictions discriminate between the two groups. The two are often used together: fit a logistic regression model, save its predicted probabilities, and run an ROC curve on those probabilities to judge the model’s discrimination.
Related guides
- Binary logistic regression in SPSS: step-by-step — build the model whose predictions an ROC curve evaluates.
- Multinomial logistic regression in SPSS: step-by-step — the right model when your outcome has more than two categories.
- How to report regression results in APA style — the same APA reporting rules applied to regression output.
Need professional guidance with your SPSS analysis? Contact us → /services/