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 Concordant | 76.6 | Somers' D | 0.582 |
---|---|---|---|
Percent Discordant | 18.4 | Gamma | 0.613 |
Percent Tied | 5.0 | Tau-a | 0.030 |
Pairs | 1644147 | c | 0.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.
Thanks for answers!!
Use more dataset options...
ods output Association=myAssociation(where=(Label2 = "Sommers' D") keep=Label2 nValue2);
PG
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
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.
Use more dataset options...
ods output Association=myAssociation(where=(Label2 = "Sommers' D") keep=Label2 nValue2);
PG
thanks guys
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.