I have some data, say (in reality, I have a large amount of data):
x y
0.1 0.267
0.2 0.254
0.3 0.182
0.4 0.173
0.5 0.121
0.6 0.089
0.7 0.070
0.8 0.056
0.9 0.031
This data roughly follows a trend curve that I plot with ggplot stat_smooth(). stat_smooth creates a grey area that it is 95% confident that the trendline will fall inside.
What I wish to do instead is create a grey area around where the trendline will be is create a grey area around where the data points will fall with 95% confidence assuming a normal distribution around the trendline.
Another way of saying it, is I want a smooth_lines connecting the tops and bottoms of the error bars and to shade inbetween in ggplot. How should I go about doing this?
Thanks.