【发布时间】:2020-08-28 13:39:42
【问题描述】:
【问题讨论】:
-
抱歉,请避免使用屏幕截图.. 否则复制您所拥有的内容有点费时。是来自exact2x2 吗?
-
好的,对不起,是的!
标签: r statistics contingency statistical-test
【问题讨论】:
标签: r statistics contingency statistical-test
您可以在vignette 中阅读更多内容,也可以查看code。使用此 wiki 图片进行说明:
优势比为 b / c,在您的情况下为 150/86 = 1.744186。您可以围绕成功的比例构建一个二项式置信区间,将 b 视为成功,将试验次数视为 b + c。
在代码中,他们用这段代码来计算:
library(exactci)
CI = binom.exact(150,86+150,tsmethod = "central")
CI
data: 150 and 86 + 150
number of successes = 150, number of trials = 236, p-value = 3.716e-05
alternative hypothesis: true probability of success is not equal to 0.5
95 percent confidence interval:
0.5706732 0.6970596
sample estimates:
probability of success
0.6355932
你有 b 的上限和下限,那么优势比是 p / 1- p:
CI$conf.int/(1-CI$conf.int)
[1] 1.329228 2.300979
binom.exact 的小插图说明:
'central' 方法给出 Clopper-Pearson 区间,而 'minlike' 方法给出了 Stern 提出的置信区间 (1954 年)(参见布莱克,2000 年)。
所以这是估计二项式置信区间的many methods 之一。
【讨论】: