0

我想定义自己的置信区间,而不是ggplot2自动为我计算它们。我已经放了一些可重现的代码来输出下面的图表。在我给出的示例中,我如何定义自己的置信区间上限和下限?

library(ggplot2)
x = 1:10
y = rnorm(10)
upper_confidence_band = y + 1
lower_confidence_band = y - 1
qplot(x,y, geom="smooth")
# `geom_smooth()` using method = 'loess' and formula 'y ~ x' 

在此处输入图像描述

4

0 回答 0