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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 3439 views
  • 0 likes
  • 3 in conversation