data HAVE;
input ID Test1 Test1Res Test2 Test2Res @@;
cards;
A 1 0.5 1 1.23
A 1 0.8 1 1.97
A 0 . 1 1.54
B 1 0.6 1 1.20
B 1 0.7 0 .
B 1 0.9 1 1.21
C 0 . 0 .
C 0 . 0 .
C 1 0.5 0 .
D 0 . 0 .
D 1 0.8 0 .
D 0 . 1 1.29
;
run;
/*ID = Subject Identifier*/
/*Test1 = Primary test result positive (1) or negative (0)*/
/*Test1Res = Primary test result*/
/*Test2 = Secondary test result positive (1) or negative (0)*/
/*Test2Res = Secondary test result*/
proc logistic data= HAVE descending plots(only)= roc;
model Test1=Test2Res / outroc= ROC;
run;
/*ROC dataset contains Probability Level, No. of TP, FP, TN, and FN, and the Sensitivity and 1-Specificity*/
To find the optimal point, I would want to find when sensitivity is the greatest and 1-specificity is the lowest, i.e. the highest Probability Level or sum(Sens, Spec), correct? From here, how would I find which threshold level the sensitivity and specificity are associated with?
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.