BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
kashlik123
Obsidian | Level 7

Lets say we want to calculate Somers' D (SD) on the following data:

 

data have;
x = 1; y = 1; output;
x = 1; y = 1; output;
x = 1; y = 0; output;
x = 0; y = 0; output;
x = 1; y = 1; output;
run;

According to the definitions in the wiki article the following can be observed:

concordant pairs = 3

discordant pairs = 0

tied pairs = 3

all pairs = 10

 

Given these results, SD would be equal to (3 - 0)/(10 - 3) = 0.4285

Now if we execute the PROC LOGISTIC procedure we get the following:

proc logistic data=have;
model y = x;
run;
 

kashlik123_14-1652283019149.png

The results show a different value for SD. In addition if 50% of the pairs are tied, which means that the total number of pairs according to the output is equal to

6 + 6*0.5 = 9, which is incorrect.

Can someone please explain to me what I am missing?

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

All of the statistics in the "Association of Predicted Probabilities and Observed Responses" table can be computed as shown in this note. As noted in the Details: Model Fitting Information: Rank Correlation of Observed Responses and Predicted Probabilities section of the LOGISTIC documentation where these statistics are defined, each pair of observations must have differing responses. So, there are 6 pairs, not 10.

View solution in original post

1 REPLY 1
StatDave
SAS Super FREQ

All of the statistics in the "Association of Predicted Probabilities and Observed Responses" table can be computed as shown in this note. As noted in the Details: Model Fitting Information: Rank Correlation of Observed Responses and Predicted Probabilities section of the LOGISTIC documentation where these statistics are defined, each pair of observations must have differing responses. So, there are 6 pairs, not 10.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 4704 views
  • 1 like
  • 2 in conversation