二项式比例的 99% 置信区间的覆盖率
Coverage of the 99% Confidence Interval of a Binomial Proportion
我有一个 rpy2 脚本可以覆盖 95% 的置信区间:
from rpy2.robjects.packages import importr
binom = importr('binom')
from rpy2 import robjects
robjects.r('''library(binom)
p = seq(0,1,.01)
coverage = binom.coverage(p, 10, method="bayes", type = "central")$coverage
''')
我想获得 99% 置信区间的覆盖率
也许是这样?
robjects.r('''library(binom)
p = seq(0,1,.01)
coverage = binom.coverage(p, 10, conf.level = 0.99,
method="bayes", type = "central")$coverage
''')
我有一个 rpy2 脚本可以覆盖 95% 的置信区间:
from rpy2.robjects.packages import importr
binom = importr('binom')
from rpy2 import robjects
robjects.r('''library(binom)
p = seq(0,1,.01)
coverage = binom.coverage(p, 10, method="bayes", type = "central")$coverage
''')
我想获得 99% 置信区间的覆盖率
也许是这样?
robjects.r('''library(binom)
p = seq(0,1,.01)
coverage = binom.coverage(p, 10, conf.level = 0.99,
method="bayes", type = "central")$coverage
''')