aphalo / ggpmisc

R package ggpmisc is an extension to ggplot2 and the Grammar of Graphics
https://docs.r4photobiology.info/ggpmisc
97 stars 6 forks source link

`stat_poly_line()` and `stat_poly_eq()` add support for GLM #64

Open aphalo opened 4 months ago

aphalo commented 4 months ago

Although ggplot2::geom_smooth() supports method="glm", the stats from 'ggpmisc' do not. The problem seems to be related to naming differences that break the extraction of members from the returned objects. This applies to all families, even family = gaussian. See also #55.

aphalo commented 4 months ago

Because of link functions use, this is rather complex to implement. For prediction lines and confidence bands support exists in stat_smmoth() from 'ggplot2'. Fitted parameters labels could be more important to implement, but as predict and summary return objects with different structure for "lm" and "glm" it may be wiser to write new stats. I set this on hold and help wanted, and move its target milestone forward.