I use Proc freq to calculate the Somers' D between the dependent variable (log salary) and the independent variable (crhits, crhome, etc.)
Is there a way to get the all the results in one proc freq statement?
The code I use currently is
DATA baseball;
SET sashelp.baseball;
RUN;
PROC SORT
DATA = baseball;
BY team;
RUN;
PROC FREQ
DATA = baseball
;
TABLES logsalary * crhits
/
MEASURES;
OUTPUT OUT = somersd
(KEEP = team N _SMDCR_
RENAME = (_SMDCR_ = somers_d
N = num_in_group))
MEASURES;
BY team;
RUN;
I'm looking to get the output "somersd" for each variable crhits, crhome, etc. in one table and to do this all in one procedure, is this possible?