【问题标题】:Is there an R function to calculate the required sample size using the Clopper-Pearson Confidence Interval?是否有使用 Clopper-Pearson 置信区间计算所需样本量的 R 函数?
【发布时间】:2020-10-05 18:17:03
【问题描述】:

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

【问题讨论】:

    标签: r sampling poisson sample-size


    【解决方案1】:

    binomSamSize pkg 有一个通用函数 binom.ciss,它允许您使用来自binom pkg 的任何置信区间函数来确定样本量。因此,您可以使用以下方法轻松确定 Clopper-Pearson 样本大小:

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

    【讨论】:

      猜你喜欢
      • 2015-01-04
      • 1970-01-01
      • 2013-02-08
      • 1970-01-01
      • 1970-01-01
      • 2013-01-20
      • 2020-06-06
      • 2019-05-01
      相关资源
      最近更新 更多