See the attached file. Thank you in advance.
Hello @khalidamin,
If you just need a dataset containing class variable names and their reference categories (which you could then "interleave" with an odds ratio table where the reference categories are omitted), you can use the ClassLevelInfo ODS output dataset:
ods output ClassLevelInfo=cli;
proc logistic ...;
...
run;
data reflevels(keep=clvar value);
set cli;
if class ne ' ' then clvar=class;
if max(of x:)=0;
retain clvar;
run;
Alternatively, you could start with the OddsRatios ODS output dataset. But unfortunately variable Effect in this dataset contains concatenated strings like 'gender 1 vs 0' so that you would need to work with character functions such as SCAN to extract variable names and values. This might become difficult in general, e.g., if values (or even variable names) contain blanks or the substring "vs", etc.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.