BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
mariko5797
Pyrite | Level 9
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?

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ
What you want is called the Youden index. When you are looking for a particular statistic in SAS, check the list of Frequently Asked-for Statistics (FASTats) in the Important Links section of the Statistical Procedures Community page. For you case, see the ROC curve and Youden index items in FASTats.

View solution in original post

2 REPLIES 2
StatDave
SAS Super FREQ
What you want is called the Youden index. When you are looking for a particular statistic in SAS, check the list of Frequently Asked-for Statistics (FASTats) in the Important Links section of the Statistical Procedures Community page. For you case, see the ROC curve and Youden index items in FASTats.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 2 replies
  • 1220 views
  • 2 likes
  • 3 in conversation