Skip to content
Prev 17989 / 20628 Next

ggplot, loess function without 95%CI option

Hi listers,

In ggplot, the loess function is only available with SE. The 95%CI option (level=.95) is unavailable, unfortunately.
I think there is demand for such an option. Well, at least I would like to make use of it.
Several contributors to stackoverflow have expressed their need and some of them have tried to program a workaround for this issue:
https://stackoverflow.com/questions/19643234/fill-region-between-two-loess-smoothed-lines-in-r-with-ggplot,
https://stackoverflow.com/questions/44736600/confidence-interval-band-for-a-loess-to-replicate-geom-smooth
Unfortunately, their workarounds have their shortcomings.

Has anyone a solution for the missing 95%CI option for loess in ggplot? It would be wonderful if the 95%CI band would look like the se band in the ggplot.
Thanks in advance.

Cheers, Frans van der Slik