BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Dinesh_
Calcite | Level 5

ods graphics on;
proc logistic data=change desc plots(only)=roc;
    class actual;
    units age=10;
    model  test(event="Yes")= actual age/outroc=x scale=none clparm=wald  clodds=pl  rsquare;
run;
quit;
ods graphics off;

/*I have written this code, is it a correct approach?*/

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

The actual response (which I assume is binary like your test variable) should be the response variable in the MODEL, not the test variable. Note that without age, your test and actual variables would just produce a 2x2 table if they are both binary. As such, an ROC curve would only have one point on it, so it wouldn't be useful. With age in the model, you'll get as many points on the ROC curve as age levels, but the curve evaluates your test and age variables together, not just the test variable alone.

 

Note you don't need the DESCENDING option if you are using EVENT=.

View solution in original post

2 REPLIES 2
StatDave
SAS Super FREQ

The actual response (which I assume is binary like your test variable) should be the response variable in the MODEL, not the test variable. Note that without age, your test and actual variables would just produce a 2x2 table if they are both binary. As such, an ROC curve would only have one point on it, so it wouldn't be useful. With age in the model, you'll get as many points on the ROC curve as age levels, but the curve evaluates your test and age variables together, not just the test variable alone.

 

Note you don't need the DESCENDING option if you are using EVENT=.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1340 views
  • 0 likes
  • 2 in conversation