I would like to plot a loess function with standard errors:
geom_smooth(method="loess", se=TRUE)
However, I get an error:
Computation failed in `stat_smooth()`:
workspace required (XXXXX) is too large probably because of setting 'se = TRUE'.
Is there an alternative way, or a fix to get SEs?
CodePudding user response:
The fix is to use mgcv::gam()
instead of stats::loess()
:
geom_smooth(method="gam", se=TRUE)