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

Hello,

I am using the following code to filter "Association of Predicted Probabilities and Observed Responses" table from proc logistic procedure output.

proc logistic data=sasuser.out040;

model default='confidence(1)'n;

    ods select Association;

    ods output Association=myAssocioation;

run;

Percent Concordant76.6Somers' D0.582
Percent Discordant18.4Gamma0.613
Percent Tied5.0Tau-a0.030
Pairs1644147c0.791

In output table I want to store only one parameter (Somers' D). How can I do this?

The output table looks like this. I can, of course, do it by selecting cValue2 where Label2 = Sommers' D, but I hope that SAS offers getting the value I need directly from output of logistic procedure without any dummy workarounds.

Clipboard02.jpg

Thanks for answers!!

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

Use more dataset options...

ods output Association=myAssociation(where=(Label2 = "Sommers' D") keep=Label2 nValue2);

PG

PG

View solution in original post

4 REPLIES 4
Haikuo
Onyx | Level 15

Not sure if I understand what you are after, but it seems straightforward to me using a data set option:

proc logistic data=sasuser.out040;

model default='confidence(1)'n;

    ods select Association;

    ods output Association=myAssocioation(where=(Label2 = "Sommers' D"));

run;


Please note, ODS displays label, not the variable name, so make sure label2 is the variable name.


Haikuo

julob
Calcite | Level 5

Hi Haikuo,

by your code I get whole line from output (see screenshot above). I want extract only one value. Any ideas?

Or can I somehow extract only one column from output?

J.

PGStats
Opal | Level 21

Use more dataset options...

ods output Association=myAssociation(where=(Label2 = "Sommers' D") keep=Label2 nValue2);

PG

PG

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of 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
  • 4 replies
  • 3832 views
  • 0 likes
  • 3 in conversation