简体   繁体   English

是否有使用 Clopper-Pearson 置信区间计算所需样本量的 R 函数?

[英]Is there an R function to calculate the required sample size using the Clopper-Pearson Confidence Interval?

我需要使用 R 确定适当的样本大小以在二项式过程中估计 p。我看到包 binomSamSize,但我没有看到使用 Clopper-Pearson 确定样本大小。

The binomSamSize pkg has a general purpose function binom.ciss, which allows you to use any confidence interval function from the binom pkg for the sample size determination. binomSamSize pkg 有一个通用函数 binom.ciss,它允许您使用binom pkg 中的任何置信区间函数来确定样本大小。 Hence, you can do Clopper-Pearson sample size determination easily using:因此,您可以使用以下方法轻松确定 Clopper-Pearson 样本大小:

library(binomSamSize)
ciss.binom(p0=0.1, d=0.1, alpha=0.05, ci.fun=binom::binom.exact)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM