Documentation web site at http://docs.r4photobiology.info/ggpmisc/ includes all help pages, with output from all examples, vignettes as well as a changelog in HTML format.
Overview
This update is special in that it was built with the input of excellent ideas and code contributions from users. I learnt a lot myself and these improvements have made ‘ggpmisc’ more useful in general and for myself. Support for quantile regression is now, I hope, close to its final shape. Support for the new ‘ggplot2’ feature: orientation is implemented in the statistics where it is most useful, and can be also be changed, more intuitively, through the model formula. Of the planned enhancements, implementing support for major axis regression, remains in the to do list. Both stat_poly_eq()
and stat_quant_eq()
now return additional labels, plus some numeric values to facilitate conditional display. Much of the code used to generate the text labels has been improved, and markdown formatting tested.
The suggestion from Mark Neal of adding support for quantile regression partly addressed in ggpmisc 0.4.0 has lead to additional enhancements in this version. The idea of supporting confidence bands for quantile regression came from Samer Mouksassi who also provided code and examples for different types of quantile regression. Additional suggestions from Mark Neal, Carl and other users have lead to bug fixes as well as to an interface with better defaults for arguments (see issue #1).
Changes compared to ‘ggpmisc’ 0.4.0
Enhancements
- Support robust regression using
rlm
and the use offunction
objects as argument tomethod
instat_poly_eq()
. - Support in
stat_poly_eq()
andstat_quant_eq()
formula = x ~ y
and other models in which the explanatory variable isy
in addition to models withx
as explanatory variable. stat_poly_eq()
andstat_quant_eq()
now pass to the geom by default a suitable value as argument toparse
depending onoutput.type
(enhancement suggested by Mark Neal in issue #11).stat_poly_eq()
andstat_quant_eq()
return the coefficient estimates asnumeric
columns indata
whenoutput.type = "numeric"
(problem withcoefs.ls
reported by cgnolte in issue #12).stat_poly_eq()
now supports optional use of lower case for r2 and p-value.- Revise
stat_poly_eq()
andstat_quant_eq()
so that by default they keep trailing zeros according to the numbers of significant digits given bycoef.digits
. A new parametercoef.keep.zeros
can be set toFALSE
to restore the deletion of trailing zeros. Trailing zeros in the equation will be rendered to the plot only ifoutput.type
is other than"expression"
. - Add
stat_poly_line()
, a new interface toggplot2::stat_smooth()
acceptingformula = x ~ y
and other models in which the explanatory variable isy
rather thanx
or settingorientation = "y"
. In contrast toggplot2::stat_smooth()
,stat_poly_line()
has always"lm"
as defaultmethod
. - Add
stat_quant_line()
which is an adaptation ofggplot2::stat_smooth()
andggplot2::stat_quantile()
acceptingformula = x ~ y
and other models in which the explanatory variable isy
rather thanx
or settingorientation = "y"
to fit models withx
as explanatory variable. This change makes it possible to add to a plot a double quantile regression.stat_quant_line()
supports plotting of confidence bands for quantile regression usingggplot2::geom_smooth()
to create the plot layer. - Add
stat_quant_band()
which plots quantile regressions for three quantiles as a band plus a line, acceptingformula = x ~ y
and other models in which the explanatory variable isy
rather thanx
or settingorientation = "y"
to fit models withx
as explanatory variable. - Add support for quantile regression
rq
, robust regressionrlm
, and resistant regressionlqs
andfunction
objects tostat_fit_residuals()
andstat_fit_deviations()
. - Support use of
stat_fit_residuals()
andstat_fit_deviations()
withformula = x ~ y
and other models in which the explanatory variable isy
in addition to models withx
as explanatory variable. - Add
weights
to returned values bystat_fit_residuals()
andstat_fit_deviations()
and add support for theweight
aesthetic as input for parameterweights
of model fit functions.
Bugs fixed
- Fix bug in
stat_poly_eq()
andstat_quant_eq()
resulting in mishandling of formulas using the+ 0
notation (reported by orgadish in issue #10). - Fix bug in
stat_poly_eq()
andstat_quant_eq()
resulting in bad/non-syntactical character strings foreq.label
whenoutput.type
was different from its default of"expression"
.
Documentation web site at http://docs.r4photobiology.info/gginnards/ includes all help pages, with output from all examples, vignettes as well as a changelog in HTML format.
NOTE: The new version of the package is on its way to CRAN.
Please raise issues concerning bugs or enhancements to this package through GitHub https://github.com/aphalo/gginnards/issues