Skip to content

sjPlot 2.5.0

Compare
Choose a tag to compare
@strengejacke strengejacke released this 12 Jul 14:31
· 555 commits to master since this release
e891ab6

New functions

  • tab_model() as replacement for sjt.lm(), sjt.glm(), sjt.lmer() and sjt.glmer(). Furthermore, tab_model() is designed to work with the same model-objects as plot_model().
  • New colour scales for ggplot-objects: scale_fill_sjplot() and scale_color_sjplot(). These provide predifined colour palettes from this package.
  • show_sjplot_pals() to show all predefined colour palettes provided by this package.
  • sjplot_pal() to return colour values of a specific palette.

Deprecated

Following functions are now deprecated:

  • sjp.lm(), sjp.glm(), sjp.lmer(), sjp.glmer() and sjp.int(). Please use plot_model() instead.
  • sjt.frq(). Please use sjmisc::frq(out = "v") instead.

Removed / Defunct

Following functions are now defunct:

  • sjt.grpmean(), sjt.mwu() and sjt.df(). The replacements are sjstats::grpmean(), sjstats::mwu() and tab_df() resp. tab_dfs().

Changes to functions

  • plot_model() and plot_models() get a prefix.labels-argument, to prefix automatically retrieved term labels with either the related variable name or label.
  • plot_model() gets a show.zeroinf-argument to show or hide the zero-inflation-part of models in the plot.
  • plot_model() gets a jitter-argument to add some random variation to data points for those plot types that accept show.data = TRUE.
  • plot_model() gets a legend.title-argument to define the legend title for plots that display a legend.
  • plot_model() now passes more arguments in ... down to ggeffects::plot() for marginal effects plots.
  • plot_model() now plots the zero-inflated part of the model for brmsfit-objects.
  • plot_model() now plots multivariate response models, i.e. models with multiple outcomes.
  • Diagnostic plots in plot_model() (type = "diag") can now also be used with brmsfit-objects.
  • Axis limits of diagnostic plots in plot_model() (type = "diag") for Stan-models (brmsfit or stanreg resp. stanfit) can now be set with the axis.lim-argument.
  • The grid.breaks-argument for plot_model() and plot_models() now also takes a vector of values to directly define the grid breaks for the plot.
  • Better default calculation for grid breaks in plot_model() and plot_models() when the grid.breaks-argument is of length one.
  • The terms-argument for plot_model() now also allows the specification of a range of numeric values in square brackets for marginal effects plots, e.g. terms = "age [30:50]" or terms = "age [pretty]".
  • For coefficient-plots, the terms- and rm.terms-arguments for plot_model() now also allows specification of factor levels for categorical terms. Coefficients for the indicted factor levels are kept resp. removed (see ?plot_model for details).
  • plot_model() now supports clmm-objects (package ordinal).
  • plot_model(type = "diag") now also shows random-effects QQ-plots for glmmTMB-models, and also plots random-effects QQ-plots for all random effects (if model has more than one random effect term).

Bug fixes

  • plot_model(type = "re") now supports standard errors and confidence intervals for glmmTMB-objects.
  • Fixed typo for glmmTMB-tidier, which may have returned wrong data for zero-inflation part of model.
  • Multiple random intercepts for multilevel models fitted with brms area now shown in each own facet per intercept.
  • Remove unnecessary warning in sjp.likert() for uneven category count when neutral category is specified.
  • plot_model(type = "int") could not automatically select mdrt.values properly for non-integer variables.
  • sjp.grpfrq() now correctly uses the complete space in facets when facet.grid = TRUE.
  • sjp.grpfrq(type = "boxplot") did not correctly label the x-axis when one category had no elements in a vector.
  • Problems with German umlauts when printing HTML tables were fixed.