不是很懂, 看看是不是这些
R*C表检验, 一般使用proc freq 的 table 语句。 如
data class;
set sashelp.class;
if height le 62 then height_group = 'Hight';
else height_group = 'Low';
run;
proc freq data=class;
table sex*height_group /chisq expected;/* request statistics and to produce the expected values */
table sex*height_group /relrisk; /* relative risk measures including the odds ratio */
/* and the column 1 and 2 relative risks */
table sex*height_group /trend; /* requests the Cochran-Armitage test for trend */
table sex*height_group /RELRISK CMH; /* request the Cochran-Mantel-Hanzel statistics */
table sex*height_group /RELRISK CMH;
run;
斜杠/后面的是选项。
没有指定选项时, 只输出 frequency, percent, row percent, column percent and total count.
不想输出的内容可以在选项中指定,比如下面程序不输出 percent, row percent and column percent.
proc freq data=class;
table sex*height_group / nopercent norow nocol;
run;
具体用那些选项,根据需要做那些统计分析来确定。
sas文件中给出了各种选项和解释。
http://support.sas.com/documenta ... at_freq_sect010.htm
不确定选项时, 可以先用/all; 查看chisq 及 measure 的结果.
Here is an example of 2x2 contingency table
http://support.sas.com/documenta ... at_freq_sect029.htm


雷达卡



京公网安备 11010802022788号







