尝试计算值对数量的比例。 为什么将prop.test用于一对或几对(pairwise.prop.test)时会得到不同的结果?
如果我只运行前几对,则得到:P值= 0.08181
prop.test(c(73,68),c(86,93),alternative ="two.sided")
##
## 2-sample test for equality of proportions with continuity correction
##
## data: c(73, 68) out of c(86, 93)
## X-squared = 3.0286, df = 1, p-value = 0.08181
## alternative hypothesis: two.sided
## 95 percent confidence interval:
## -0.01122346 0.24653229
## sample estimates:
## prop 1 prop 2
## 0.8488372 0.7311828
当我跑超过1对时,我得到了差异。 P值
smokers <- c( 73, 68, 98, 70 )
patients <- c( 86, 93, 136, 182 )
pairwise.prop.test(smokers, patients)
##
## Pairwise comparisons using Pairwise comparison of proportions
##
## data: smokers out of patients
##
## 1 2 3
## 2 0.16 - -
## 3 0.12 0.98 -
## 4 1.8e-11 4.4e-07 2.9e-08
##
## P value adjustment method: holm
我做错了什么?
谢谢