BookmarkSubscribeRSS Feed
hein68
Quartz | Level 8

How do I alter the code below to make sure I get the c statistic?

 

ods graphics on;

proc logistic data=&data SIMPLE plots(only)=(roc(id=prob) effect)
PLOTS(ONLY)=(ODDSRATIO(range=clip));
model variable_2cat = ARG1_Hs00163660_m1 /
LACKFIT
RSQUARE
LINK=LOGIT
CLPARM=WALD
CLODDS=WALD
ROCCI;

run;
quit;

 

Thanks!

2 REPLIES 2
sbxkoenk
SAS Super FREQ

Hello,

 

Why do you think you won't get the c-statistic with above code?

The c-statistic is in the last printed table (default output), entitled "Association of Predicted Probabilities and Observed Responses" (right-bottom cell).

The ODS table name is 'Association'.

 

Koen

Ksharp
Super User
data test ( keep = anemia allergy weight visit );
 set sashelp.bweight;
 if _N_ <= 100;
 anemia = black;
 allergy = married;
run;





ods select none;
*Outcome = ANEMIA;
proc logistic data = test descending  ;
 model anemia = weight visit/outroc=roc1;
 ods output Association=Association1;
run;
ods select all;

Check dataset Association1

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2202 views
  • 0 likes
  • 3 in conversation