我需要在我的图中添加二项式置信区间。
这是我的步骤:
library(binom)
library(plotrix)
x <- c(1:6)
y <- c(68, 69, 70, 75, 75, 87)
CI <- binom.confint(y, 265, conf.level = 0.95, methods = "exact")
plot(x, y)
plotCI(x, y, ui = CI$upper, li = CI$lower, add = TRUE)
我认为我做的一切都是正确的,但我的输出图似乎不正确:
你有什么建议吗?