BookmarkSubscribeRSS Feed
GS2
Obsidian | Level 7 GS2
Obsidian | Level 7

Using SAS 9.4 

 

I have a 3 level response variable and continuous predictor variable (see data example below). What would be the best method to get the sensitivity, specificity, positive predictive value and negative predictive value and to create a ROC/AUC plot?

 

data have;
infile datalines delimiter=',';
input flex $ motor;
datalines;
Baseline,3
Baseline,4
Baseline,5
Baseline,6
Negative, 7
Negative, 8
Negative, 9
Negative, 10
Negative, 5
Negative, 4
Negative, 8
Negative, 9
Positive,10
Positive,7
Positive,3
Positive,5
Positive,6
Positive,8
Positive,10
Positive,4
Positive,3
;

 

I tried the code below; however, I get the the following note in the log

"NOTE: Since there are more than 2 response levels, the OUTROC= option has no effect."

 

ods graphics on;
proc logistic data=want outest=parms(keep=intercept motor);
model flex(event='Positive')= motor / outroc=roc1;
output out=out p=phat;
run;
ods graphics off;

1 REPLY 1
StatDave
SAS Super FREQ

The statistics you mention, including the ROC curve, is only defined for a binary response. However, a multinomial version of the AUC statistic is available from the MultAUC macro.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1 reply
  • 877 views
  • 0 likes
  • 2 in conversation