gavinsimpson / gratia

ggplot-based graphics and useful functions for GAMs fitted using the mgcv package
https://gavinsimpson.github.io/gratia/
Other
206 stars 28 forks source link

Add simultaneous intervals on smooths in `draw.gam()` #314

Open gavinsimpson opened 2 months ago

gavinsimpson commented 2 months ago

Discussed in https://github.com/gavinsimpson/gratia/discussions/313

Originally posted by **AlainZuur** September 6, 2024 Hello...what would be the easiest way to get simultaneous CIs with draw()? I can get them manually with confint...but it would be much easier if draw() could plot them (I don't think it can??). I can see how to do it manually: https://gavinsimpson.github.io/gratia/articles/custom-plotting.html This part: sm <- smooth_estimates(m) |> add_confint() And then replace by: confint and adjust the type argument. Is there any way of doing this faster? Or change that line in draw.gam? Alain