Skip to content
Prev 17993 / 20628 Next

ggplot, loess function without 95%CI option

This isn't really the appropriate forum for that question because the
question has nothing to do with mixed-effects models.

That said, it really helps to just read the documentation:

https://www.rdocumentation.org/packages/ggplot2/versions/3.2.1/topics/geom_smooth

The default for loess in modern ggplot2 is indeed the 95% CI. You can
adjust this with the level option, e.g.

library(ggplot2)
ggplot(mtcars, aes(x = mpg, y = hp)) +
? geom_point() +
? geom_smooth(method = 'loess', fill='darkred', level=0.68) +

? geom_smooth(method = 'loess')

Note that level=0.68 corresponds to the SE case and provides a shaded
area about half as wide as the the default case, which is in line with
the Wald approximation that 95% CI = ?2 * SE.


Best,

Phillip
On 11/10/2019 20:36, Slik, F.W.P. van der wrote: