a=data.frame()
> a=edit(a)
> a
var1 var2
1 1 9
2 10 10
> chisq.test(a)
Pearson’s Chi-squared test with Yates’ continuity correction
data: a
X-squared = 3.0323, df = 1, p-value = 0.08162
Warning message:
In chisq.test(a) : Chi-squared近似算法有可能不准
> fisher.test(a)
Fisher’s Exact Test for Count Data
data: a
p-value = 0.04851
alternative hypothesis: true odds ratio is not equal to 1
95 percent confidence interval:
0.002314923 1.146071049
sample estimates:
odds ratio
0.1187667