Geom smooth shading based on standard error

How can I make the shading of geomsmooth based on standard error? By default the shading of geom smooth is level of confidence interval to use (0.95 by default)

# Make confidence intervals the same color as line by group
ggplot(iris, aes(x = Sepal.Length, 
                 y = Sepal.Width)) + 
  geom_point() + 
  geom_smooth()

My guess is you are looking for

library(tidyverse)
ggplot(iris, aes(x = Sepal.Length, 
                 y = Sepal.Width)) + 
  geom_point() + 
  geom_smooth(level=.6827,
              method="lm")

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.