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

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

Register now

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
  • 2530 views
  • 0 likes
  • 3 in conversation