【发布时间】:2023-03-29 10:02:01
【问题描述】:
我有一个 2 x 2 阶乘数据集,我使用 mean_cl_boot 函数为其绘制了置信区间。我想使用适当的函数在 R 中计算它。我该怎么做?
我的数据集样本如下:
df <- data.frame(
fertilizer = c("N","N","N","N","N","N","N","N","N","N","N","N","P","P","P","P","P","P","P","P","P","P","P","P","N","N","N","N","N","N","N","N","N","N","N","N","P","P","P","P","P","P","P","P","P","P","P","P"),
level = c("low","low","high","high","low","low","high","high","low","low","high","high","low","low","high","high","low","low","high","high","low","low","high","high","low","low","high","high","low","low","high","high","low","low","high","high","low","low","high","high","low","low","high","high","low","low","high","low"),
repro = c(0,90,2,4,0,80,1,90,2,33,56,0,99,100,66,80,1,0,2,33,0,0,1,2,90,5,2,2,5,8,0,1,90,2,4,66,0,0,0,0,1,2,90,5,2,5,8,55)
)
我知道有一些方法可以从图表中提取 CI 点,但我确实不想这样做。我想使用计算这个的函数。
【问题讨论】:
标签: r ggplot2 confidence-interval