I intend to update this post tracking changes to ‘ggpmisc’
Introduction
Estimated parameters for fitted models of y on x or x on y
ANOVA and summary tables for fitted models of y on x or x on y
Mixture models of distributions of x or of y
Parametric and non-parametric correlation between x and y
Multiple pairwise contrasts
Models of y on x
The same set of character pre-formated labels for parameter estimates are returned. Their value is set to NA_character_ when the estimates are not available. By available, I mean, that the statistics in ‘ggpmisc’ are able to extract them from the fitted model object or its summary. I have aimed at designing the code so that missing query methods or missing named fields in objects do not trigger errors, but instead return NA values.
Even with automatic formatting of the labels there is some flexibility, allowing adjustment of, among other things, the symbols used in place of x and y, or the inclussion or not of the left hand side of the model equation. Which parameter-estimate-labels are concatenated and mapped to the label aesthetic can be easily set by calling function use_label() but as ‘ggplot2’ remains fully supported can also be done with functions like paste() and sprintf() within a call to aes().
It is always also possible to manually create the labels during the mapping of the label aesthetic from the numeric values of estimates, which are also returned.
Fitted model equations
Automated assembly of the fitted model equation is supported only for polynomials with no missing terms, but possibly with intercept forced to zero. Some linear splines are also supported. For other fitted models the numeric values can be used to format the equation with a call to paste() or to sprintf() when creating the mapping to label in a call to aes().
Not all fitted model objects are equally supported. In addition to classes expressely supported, if methods formula() and coef() exist, it is likely that an equation can be formated, either automatically or manually.
\(F\) and \(P\)
Automatically generated labels for \(F\) and \(P\)