我使用 Proc freq 来计算因变量(对数薪水)和自变量(crhits、crhome 等)之间的 Somers' D
有没有办法在一个 proc freq 语句中获得所有结果?
我目前使用的代码是
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;
我希望在一个表中为每个变量 crhits、crhome 等获取输出“somersd”,并在一个过程中完成所有这些,这可能吗?