Skip to content

gratia 0.11.1

Latest
Compare
Choose a tag to compare
@gavinsimpson gavinsimpson released this 25 Aug 12:10
· 1 commit to main since this release

A new version of gratia is out! The main reason for this release is to make gratia compliant with the upcoming 4.0.0 release of ggplot2. This has led to a small improvement in residuals_hist_plot() to better align the bins. I'd also already implemented a few more CDF functions for some of mgcv's families, so they came along for the release ride. Finally, a couple of bugs were fixed and partial_derivatives() got some quality of life improvements.

The full changelog for the release is below.

User visible changes

  • residuals_hist_plot() and hence appraise() now centre the middle bin of
    the histogram at 0. In part this was due to ggplot2's new binning algorithm
    leading to potentially odd choices for the bin breaks in the context of model
    residuals.

New features

  • quantile_residuals() now supports more of mgcv's families:

    1. scat(),
    2. nb()
    3. betar(),
    4. tw().
  • Several user friendliness improvements in partial_derivatives():

    • now better handles the case where there are multiple smooths for which
      partial derivatives are required,
    • correctly identifies smooths that involve random effect terms (i.e. any
      smooth or tensor product marginal smooths with bs %in% c("re", "fs"))
      and ignores them,
    • identifies and ignores univariate smooths, and
    • displays more informative error messages to explain what was wrong.

    Part of discussion with @BenFN121 in #356.

Bug fixes

  • partial_derivatives() threw an error when the select argument was used.
    #356 reported by @BenFN121

  • draw.conditional_values() was setting a label on the fill aesthetic even if
    that aesthetic was not being used. In ggplot2 v4.0.0 this resulted in a
    warning, which is fixed.