LZ,你是不是搞错了?这哪是什么2*2列联表呀? 请看下面的示例,认识一下真正的2*2列联表(别称:四格表)
data a;
do r=1 to 2;
do c=1 to 2;
input w;
output;
end;
end;
proc freq;
weight w;
tables r*c/chisq nocol norow nopct expected;
run;
下面是运行结果:
The FREQ Procedure
Table of r by c
r c
Frequency|
Expected | 1| 2| Total
---------+--------+--------+
1 | 37 | 48 | 85
| 37.376 | 47.624 |
---------+--------+--------+
2 | 25 | 31 | 56
| 24.624 | 31.376 |
---------+--------+--------+
Total 62 79 141
Statistics for Table of r by c
Statistic DF Value Prob
------------------------------------------------------
Chi-Square 1 0.0170 0.8963
Likelihood Ratio Chi-Square 1 0.0170 0.8963
Continuity Adj. Chi-Square 1 0.0000 1.0000
Mantel-Haenszel Chi-Square 1 0.0169 0.8967
Phi Coefficient -0.0110
Contingency Coefficient 0.0110
Cramer's V -0.0110
Fisher's Exact Test
----------------------------------
Cell (1,1) Frequency (F) 37
Left-sided Pr <= F 0.5166
Right-sided Pr >= F 0.6197
Table Probability (P) 0.1363
Two-sided Pr <= P 1.0000
Sample Size = 141