I am looking to produce the Somers' D using Proc Freq using the following code:
DATA HAVE;
DO I = 1 TO 1000;
Y = RANUNI(0);
X = RANUNI(1) * 10;
OUTPUT;
END;
RUN;
PROC FREQ
DATA=have
NOPRINT;
TABLES y * x / MEASURES;
OUTPUT OUT=somersd
(KEEP = _SMDCR_
RENAME = (_SMDCR_ = somers_d))
MEASURES;
RUN; /*This is somers' D for Somers’ D(C|R)*/
I read from the documentation that the above code tests concordinance on Y as the column and X as the row, but I wanted to make sure this is the case:
Now, which is the correct way to test for concordance is it
y * x
or
x * y
Any help will be appreciated