ggpmisc
ggpmisc copied to clipboard
Support linear splines in `stat_poly_eq()` and other enhancements
Automatically generating eq.label for linear splines seems too complex to be worthwhile the effort, at least at the moment. However, a few changes to stat_poly_eq() would be very useful, as for example, currently the position of knots is not returned. Most important (and easier) is to support 'segmented'. No changes are needed in stat_poly_line().
Linear splines
- [x] Avoid generation of bad equation labels when functions from package 'lspline' are used. Return
NAinstead. - [x] Avoid generation of bad equation labels when functions from package 'segmented' are used. Return
NAinstead. - [x] Return numeric values for parameter estimates when
output.type = "numeric"but noeq.labelis generated. - [x] Return the position of knots fitted by
segmented(), estimates and their s.d..
All methods
- [x] Return the names of the parameters as retrieved from
fm. - [ ] ~~For polynomial/linear model fits return s.d. for estimates of model parameters as
b_i.sein addition tob_iwhenoutput.type = "numeric", or as a vector (what would be better??).~~ Not really easy to show in an equation.
Other tasks
- [x] Update the help for
stat_poly_eq(). - [x] Update article.
- [ ] Add off-line tests to avoid dependency on these packages.