The Linearity and Homogeneity of Variance panels of check_model() (and the
plot of check_heteroscedasticity()) now draw the mean of each cell, joined
by a line, in place of the LOESS smoother when the fitted values take only
a few distinct values, for example in models with only categorical
predictors. A LOESS fit over so few values warned and could bend far
outside the data. When show_ci is TRUE, the cell means get 95% error
bars. Note that performance currently turns show_ci off for models
whose terms are all factors without interactions (#464).
plot() for check_model() and check_heteroscedasticity() gains a
show_smooth argument. With show_smooth = FALSE, the Linearity and
Homogeneity of Variance panels draw neither the LOESS smoother nor the cell
means, the Influential Observations panel draws no LOESS smoother, and the
subtitles of the Linearity and Homogeneity of Variance panels no longer refer
to a reference line (#464).
plot() for datawizard::means_by_group() gets a flip argument. Use
flip = FALSE to show the groups on the horizontal axis (#455).
geom_violinhalf() and geom_violindot() are now drawn with the ggdist
package (ggdist::stat_slab() and ggdist::geom_dots()), which they now
need (version 3.3.3 or later). They work with facets and free scales (#81,
#385), and the plots look a little different. Dodged groups each take half
of their dodge cell, from its centre, as before. The dots of
geom_violindot() were not dodged before. By default, they now go in the
other half of the cell (they overlap a flipped half violin). The new interval argument
adds the median with 66% and 95% intervals (#68). The binwidth default of
geom_violindot() is now NA (it was 0.05), so ggdist sizes the dots to
the data (#44). Other arguments in ... of geom_violindot() now go to
ggdist::geom_dots() (instead of geom_dotplot()) as well as to the half
violins, except the arguments of the density, the layout, and the interval,
which go to the half violins only (see ?geom_violindot). A width in ...
is the width of a whole violin, as in geom_violin(), so each half violin
is half as wide. bounds must contain all values; otherwise the half
violins are not drawn. The stat argument is now ignored, with a warning
for any value other than "ydensity" or ggplot2::StatYdensity.
geom_violindot() no longer works with coord_polar().
plot() for modelbased::estimate_contrasts() now draws joint contrasts of
two or more variables, such as contrast = c("am", "cyl"). The x axis shows
the combinations of levels, such as "auto, 4".
plot() for modelbased::estimate_contrasts() gains a show_data argument.
With show_data = TRUE, the plot draws the raw data of the model as jittered
points behind the lighthouses (easystats/modelbased#114).
plot() for modelbased::estimate_contrasts() now draws more kinds of
estimates. It draws means in a Probability, Proportion, or Rate column,
such as the probabilities of a logistic model. It draws ratio contrasts from
comparison = ratio ~ pairwise as ratios of the means. With the default
backend, it draws contrasts of a log response estimated with
transform = TRUE as ratios of the back-transformed means. The plot stops
with an error for contrasts back-transformed from some other
transformations, such as sqrt(y). When insight::find_transformation()
reports a transformation other than "identity", it also stops for ratio
contrasts estimated with transform = TRUE. It also stops for contrasts and
means on different scales, as their predict or transform arguments
show. The help page lists the exceptions. With show_data = TRUE, the plot
draws a logical or two-level factor response as 0 and 1. It also draws the
raw data of y for a response log(y), log2(y), or log10(y). This needs
contrasts and means estimated with transform = TRUE.
plot() for modelbased::estimate_contrasts() now draws ordinal and
multinomial models, such as MASS::polr() and mclogit::mblogit(), with one
panel per response category. Each panel shows the probabilities of that
category and the contrasts within it. Contrasts between two categories are
not drawn. show_data = TRUE stops with an error for these models. The plot
also draws Bayesian ratio contrasts from comparison = ratio ~ pairwise as
ratios. When insight::find_transformation() reports "identity", it draws
ratio contrasts estimated with transform = TRUE as ratios. It accepts
contrasts and means on the link scale from the marginaleffects and emmeans
backends together. For some models, such as lm(y ~ x), the link scale
counts as the response scale. These models have an identity link, and
insight::find_transformation() reports their response as "identity".
The link scale does not count for a model with a zero-inflation or hurdle
part.
plot() for modelbased::estimate_contrasts() now shows only the panels
of the by levels that the contrasts have. It leaves out the means and
raw data of other levels. A numeric contrast variable at unevenly spaced
values, such as contrast = "wt=c(2,2.5,4)", gets a continuous x axis
that keeps their spacing. Joint contrasts of three or more
variables show one level per line in the axis labels. A by variable
named PANEL, ROW, COL, SCALE_X, or SCALE_Y no longer stops the
plot.
If a term with a VIF below 2 has an upper confidence limit that is infinite
or above the top of the plot, the collinearity plot now has a caption. The
caption says that the interval formula (from performance) fails near
VIF = 1, and that this is not high collinearity. This applies to plot()
for check_collinearity() and to the collinearity panel of check_model().
The y axis now extends below VIF = 1, so the axis no longer cuts off points
at 1 (#399).
plot() for structural equation models from parameters::model_parameters()
drew latent factors as observed variables and indicators as latent
variables. Latent factors are now drawn as circles and indicators as
squares.
plot() for structural equation models now gives an informative error
when the selected component has no paths to plot, for example
component = "regression" for a confirmatory factor analysis (#243).
geom_binomdensity() now works with facets. It no longer drops the
columns other than x and y, so each panel shows only its own data
(#192).
When check_model() failed to create plots, the informative message
about troubleshooting and workarounds was no longer printed. This should
now work again.
plot() for modelbased::estimate_contrasts() now draws each contrast
estimated with by from the means of its own by level. Previously, it mixed
the means of all by levels into each contrast. If the means listed the by
variable first, it drew no contrasts. The plot now shows one panel per level,
or combination of levels, of the by variables. The x axis now shows the
contrasted variable in the order of its levels (easystats/modelbased#267).
When some observations had a missing Cook's distance, plot() for
check_outliers() failed with "arguments imply differing number of rows".
An example is rows with missing values in a model fitted with
na.action = na.exclude. The scree and count plots now leave these
observations out, and the labels still name the right rows.
Argument linewidth was renamed to size_line, to be consistent across the
easystats-ecosystem. However, linewidth remains as an alias, since this is
the name of the corresponding ggplot2-argument.
plot() for check_heteroscedasticity() now works for GLM's and models from
package glmmTMB. Previously, check_heteroscedasticity() worked for linear
models only.
plot() for check_heteroscedasticity() now uses Pearson residuals for
glmmTMB and MixMod models. Previously these residuals were divided by a
single scalar, which is only correct when the variance function does not
depend on the mean; for non-mixed binomial and Poisson models that scalar was
1, so the plot could suggest heteroscedasticity for correctly specified
models. See easystats/performance#926.Added plot method for prior predictive checks, from the performance::check_priors()
function.
The plot() method for performance::check_dag() gains a size_arrow argument,
to control the size of arrows in the DAG.
Added plot method for datawizard::means_by_groups() objects.
The type argument in performance::check_predictions() was not recognized in
the plot() method.
plot() for model_parameters() with lavaan objects did not work when the
object contained no loadings component.
plot() for parameters::factor_analysis() and parameters::principal_components()
gains a new type option, "graph". This creates a graph with nodes/edges
indicating factor loadings.
Updated plot-method for performance::check_model() for Bayesian ordinal
models.
New geom_point_halo(), geom_pointrange_halo(), geom_jitter_halo() and
geom_count_halo() geoms, which add a slight contour around the points
Outlier plots no longer show extreme smoother curves for models with a small number of observations or a small number of outlier data points.
*_borderless aliases for geom_point2() or geom_jitter2(), which
were broken and did not render as intended.plot() for objects from parameters::model_parameters() were
sorted in reverse order when using the sort argument. This was fixed, thus,
sort = "ascending" now sorts the data in ascending order in plot/math logic.Daniel Lüdecke is now the main maintainer of the package.
Several plot() methods gain a theme argument, to control the visual
themes for plots. This is in particular useful for plots that consist of
several single plots, like the one returned by check_model().
plot() for check_model() now limits the number of data points for models
with many observations, to reduce the time for rendering the plot. Use argument
maximum_dots to define the maximum number of data points to show.
plot() for check_model() extracts the show_ci attribute from objects
returned by check_model(), to show or hide confidence intervals.
plot() method for estimate_density() with vector input
and group_by argument.4.1, since {correlation},
a runtime dependency, requires it.plot() for performance::check_normality() now also supports objects from
psych::fa(), psych::principal() and parameters::factor_analysis().
plot() for performance::check_outliers() gets a new "scree" type option,
to create a scree plot of outlier statistics.
Minor re-labelling of axis titles and subtitles in plot() for
performance::check_residuals().
Updates the package to adapt to the changes in the latest {ggplot2}
release.
Themes get an axis.text.space argument, to define the spacing between axis
lines and axis labels. Due to changes in {ggplot2}, the default spacing was
slightly changed, now it can be set to the desired value using this argument.
All theme_*() function get a ... argument that is passed to
ggplot2::theme().
Arguments that change the size of elements in theme_*() functions (like
plot.title.size or axis.text.size now scale with the base_size argument,
to ensure proper scaling of plots when the base-size is changed.
Added a new theme, theme_azurelight(), with a light-blue character, and
reduced use of grid lines.
theme_modern() now recognizes a show.ticks argument, to add tick marks to
the plot and slightly increase the distance between axis labels and the
related axis.
Color scale functions (those starting with scale_*()) get a new "gradient"
palette, which are simply the color values for blue and orange colors from
that palette. Furthermore, color scale functions now automatically select an
appropriate palette (usually, "contrast" or "gradient") depending on
whether discrete or continuous color scales are requested.
estimate_density().plot() for p_function() now checks the values of the size_length
argument, to give an informative error message when the input is not valid.
plot() for model_parameters() now also plots group-levels of random
effects (i.e. for mixed models, when model_parameters(x, ..., group_level = TRUE)).
plot() for model_parameters() gets a show_direction argument, to turn
off the direction of the effect in the plot.
plot() for model_parameters() now gives an informative error message when
trying to plot Anova tables (which does not work).
plot() for simulate_parameters() now better copes with models that have
multiple response levels (e.g. multinomial models).
Gains {patchwork} as a hard dependency given its importance for the
package.
Fixed issue in plot() for bayestestR::si().
Fixed issue in plot() for parameters::model_parameters() for GAM models.
New plot() method for performance::check_dag().
Minor improvements to plot() for methods p_direction() and
p_significance(), which also support forthcoming changes in the parameters
package.
plot() for performance::check_model() when package
qqplotr is not installed.4.0.Improved scaling for detrended QQ plots when package {qqplotr} is not
installed. The normal and the detrended QQ plots are now visually more
similar.
Gets rid of warnings due to API changes in the {datawizard} package.
Fixes warnings generated from the {ggplot2} 3.5.0 release.
Small adjustment to size of point geoms for check_model() plots.
More arguments to change base font sizes and geom sizes are now passed to
downstream plot-functions (i.e., plot() for check_model() passes arguments
to change geom sizes to the underlying plot-functions).
plot() for check_predictions() now supports Bayesian regression models
from brms and rstanarm.
plot.compare_parameters().New plot() method for simulated residuals (implemented in the performance
package).
plot() for check_model() was revised and now includes more accurate Q-Q
plots for non-Gaussian models.
plot.check_model() now passes arguments size_point and size_line to the
posterior predictive check plot.
Minor changes regarding the latest update of ggplot2.
plot.n_factors() now shows a dashed line over the bars, indicating the
cumulate explained variance by the number of factors.
plot.check_outliers() now dodges the x-axis labels, to avoid overlapping
labels.
{see} to an MIT license.plot() method for outputs of datawizard::data_tabulate()
(#293).The print() method for performance::check_model() now also evaluates the
default plot type for posterior predictive checks.
QQ/PP-plots now default to drawing simultaneous testing bands (when the
qqplotr package is available). Previous behavior can be restored by setting
method = "pointwise".
Plot method for performance::check_normality() now default to a detrended
QQ-plot. Previous behavior can be restored by setting type = "density".
Plot method for binned_residuals() gains a show_smooth argument, to show
or hide the smooth line.
Plot method for check_predictions() gains a x_limits argument, to limit
the x-axis-range. This can be useful to "zoom in" certain parts of the plot.
plot() for performance::check_model() no longer produces a normal QQ plot
for GLMs. Instead, it now shows a half-normal QQ plot of the absolute value of
the standardized deviance residuals.
plot() for performance::check_model() and
performance::check_predictions() gains a type argument, to either create
density plots, or discrete dots resp. interval plots for posterior predictive
checks.
plot() for performance::check_model() gains an n_column argument, to
define the number of columns for the diagnostic plots (by default, two
columns).
plot() for performance::check_model() sometimes failed to create the plot
under certain conditions, e.g. when the screen or app windows was zoomed-in.
If an error occurs, a much more informative error message is shown, providing
several possible solutions to resolve this problem.
plot() for parameters::equivalence_test() now aligns the labelling with
the print() method. Hence, the legend title is no longer labelled "Decision on H0", but rather "Equivalence", to emphasize that we can assume practical
equivalence for effects, but that we cannot accept the H0 (in a frequentist
framework).
Added some examples and cross references between docs. Furthermore, a vignette about plotting functions for the datawizard package was added.
Fixed issue with duplicated legend in the plot() method for
performance::check_predictions().
Fixes issue in plot.binned_residuals() for models whose residuals were
completely inside error bounds.
plot() now works when using it on the output of describe_distribution()
with a select argument of length 1.
Changed the default "yellow" color in palette_okabeito() to "#F5C710"
instead of "#F0E442" to increase visibility against a white background. For
the original Okabe-Ito palette, set palette = "full_original" or palette = "black_first_original".
Deals with deprecated arguments and functions in recent {ggplot2} updates.
Updates docs and tests for {ggplot2} release (3.4.0).
New function scale_color_colorhex() provides color scales based on palettes
from color-hex.com (#245).
The default for the smoothing bandwidth from plot.check_predictions() has
changed from "nrd0" to "nrd", which seems to produce better fitting plots
for non-Gaussian models. Furthermore, performance::check_predictions()
accepts a bw argument (smoothing bandwidth), which is passed down to the
plot() method's density-estimation.
plot() for check_outliers() for models with convergence
issues.Indrajeet Patil is now the maintainer.
The minimum needed R version has been bumped to 3.6.
Replaced deprecated arguments in function calls.
plot() method from model_parameters() for
intercept-only models.Added aesthetics argument to all color and fill scale functions so that
the same scale can be applied to multiple aesthetics and so that the functions
can be used with other aesthetics from other packages (e.g., edge_color).
Added Okabe-Ito color palette (palette_okabeito, scale_color_okabeito())
etc.)
Several minor improvements.
plot.check_collinearity(), which is now a dot-plot,
including error bars.plot.check_model() did not apply the colors argument to all sub-plots.
plot() for model_parameters() could fail when model objects' class
attribute had more than one element.
Improved plotting for performance::check_model():
using more appropriate plots for binomial models
the redundant density-plot of normality-checks was replaced by the posterior predictive check plot.
includes a plot to investigate overdispersion for count-models.
Minor improvements for some plot-methods (colour tweaking, labelling, ...).
Add option to show density layers for Bayesian and bootstrapped models in
plot() for parameters::model_parameters().
Negative coefficients in plot() for parameters::model_parameters() are now
always red.
Improve support for parameters::model_parameters() from emmeans objects.
Updated code and examples to work with new API decisions made for the performance package.
check_model() function now uses patchwork instead of gridExtra to
arrange plots in a grid.
Reduced/removed some package dependencies.
Revise plot() for bayestestR::bayesfactor() to meet forthcoming changes in
the bayestestR package.
New functions geom_from_list and geoms_from_list to create geoms from
lists.
Plotting for normality check is now supported for afex_aov models.
show_intercept is no longer ignored in plot()
for rope().Added plot-function for parameters::compare_parameters().
Added option to detrend QQ/PP plots.
Plot for SEM models now has arrows pointing from the latent variables towards the manifest variables.
The plot() method for check_model() was revised and should now be more
consistent regarding titles and subtitles, as well as color schemes and plot
order. Furthermore, the plot for influential observation was changed in order
to better catch the potential influential observations.
The check_heteroscedasticity() plot contains a dashed horizontal line, which
makes it to assess the homoscedasticity assumption.
The y-axis label for check_collinearity() plot clarifies that the measure
being plotted is VIF. This was unclear when this plot was embedded in a grid
of plots from check_model() containing multiple checks.
Plotting methods for performance_roc() and performance_accuracy() show
correct labels now.
Fixed issue with wrong labelling of CI-levels for plot.see_hdi().
Fixed minor issues due to breaking changes in other easystats-packages.
plot() for performance::check_normality() gains a alpha-argument, to
change the alpha-level of confidence bands.
The ... argument for geom_violindot() is now also passed to to
geom_violinhalf(), allowing, e.g., to change the alpha value of the
violin-geoms as well.
Reorganized order of arguments in geom_violindot(), so aesthetics arguments
like fill are not absorbed by partial matching for arguments like
fill_dots.
plot() for performance::check_normality() shows more accurate QQ-plots.
plot() for performance::check_normality() show correct confidence bands
for QQ- and PP-plots (with qqplotr). Previous bands were extremely narrow!
plot() for parameters::model_parameters() now supports models from package
metaBMA
plot() for parameters::model_parameters() gains a weight_points
argument, to adjust the point-size depending on study-weights for
meta-analysis models.
plot() for parameters::model_parameters() now labels the x-axis depending
on model-type (i.e. "Odds Ratio" instead of "Exp(Estimate)") when this
information is available.
plot() for parameters::model_parameters() for brmsfit
models.text_size and
size_text, or just size even if only in the context of text labels. We now
tried to harmonize these kind of arguments to gain more consistency throughout
the different plot() methods.Added plot-function for parameters::model_parameters() for
brms-meta-analysis models.
Added plot-function for performance::pp_check().
plot() for parameters::model_parameters() gains a size_text-argument, to
add text values for estimates and confidence intervals to the plot (see also
vignette).
plot() for parameters::model_parameters() from meta-analysis models (e.g.
from metafor) gains a type argument, to create funnel plots with type = "funnel".
plot() for bayestestR::estimate_density() and
parameters::simulate_parameters() were revised, and now also include the
point-estimate and error bar. Therefore, arguments centrality and ci were
added.
Fixed bug in plot.model_parameters() when standardize was "basic",
"smart" or "posthoc".
Fixed wrong axis labelling for ROC-curves (from
performance::performance_roc()).
plot() for correlation::correlation() gains a type and size argument,
to plot correlation matrices either as tiles or circles.Added new color-palettes.
Palettes for existing color scales have been revamped.
Added "light" palettes for dark themes.
Plot-function for parameters::describe_distribution() gains highlight,
highlight_color and size arguments.
Plot-function for parameters::describe_distribution() now uses thin bars for
variables with integer values (instead of less precise histogram).
Plot-function for performance::check_normality() gains size and
point_size arguments.
Plot-function for performance::check_normality() now also plots normality of
random effects, when check_normality(effects = "random") was called.
Legend labels nopw show a percentage-sign where applicable (for instance, for
plot.hdi()).
Fixed issue with argument n_column in plot.p_significant(), plot.hdi(),
and plot.p_direction(), which stopped working since R 4.0.0.
Fixed issue in plot.performance_roc() with swapped x/y axes.
golden_ratio() was added as a helper to get nice proportions.Added plot-function for correlation::summary().
Added plot-function for parameters::describe_distribution().
Added plot-function for effectsize::equivalence_test().
Added plot-function for various effectsize-functions, like
effectsize::eta_squared().
plot.estimate_density() now also works for density estimation of data
frames.
plot.equivalence_test() now also works for frequentist models and data
frames (see parameters::equivalence_test()).
Slightly changed plotting-style for plot.equivalence_test().
correlation::correlation().plot() for model_parameters.rma() now arranges facets by subgroups (see
vignettes).
minor improvements to plot() for parameters::cluster_analysis().
minor improvements to plot() for parameters::model_parameters.brmsfit().
Plot-function for bayestestR::si() gets a support_only argument, to plot
only the support data or the "raw" prior and posterior distributions.
ncol and nrow in plots() were renamed into n_columns and
n_rows to be consistent with arguments from other functions in the
see-package.Added plot-function for performance::compare_performance().
Added plot-function for bayestestR::si().
plot()-functions for the
bayestestR-package
now also support BFBayesFactor and MCMCglmm objects.
plot() for parameters::model_parameters() now uses fixed axis for facets
when model is an ordinal or cumulative link model (because all facets are on
the same scale, and thus parameters are easier to compare).
Fixed issue with group coloring for parameters::model_parameters() when
exponentiate = TRUE.
Fixes issue with plot.point_estimate() for vectors.
how_to_plot() was removed for the time being, due to its inadequate
maintenance effort. It might be re-implemented sometime in the future...Improved layout (vertical alignment) for some plotting-functions for the bayestestR-package, when there was only one parameter. Plots now are closer to the x-axis, removing unnecessary empty space.
Labels and plot annotations are now more "human readable", and labelling is more context sensitive.
Added coord_radar for radar charts.
Added plot-function for parameters::cluster_analysis().
Added plot-function for parameters::principal_components().
Added plot-function for parameters::parameters_simulate().
Added plot-function for parameters::n_factors().
Added plot-function for bayestestR::p_significance().
plot() for parameters::model_parameters() gets a sort-argument to sort
coefficients.
plot() for parameters::model_parameters() now also create forest plots for
meta-analysis.
plot() for bayestestR::bayesfactor_parameters() only plots facets when
necessary.
plot() for performance::check_outliers() now also plot multiple methods in
one plot.
Following plot() methods get a n_columns-argument, so model components
like random effects or a zero-inflation component can be plotted in a
multi-column layout: bayestestR::p_direction(), bayestestR::hdi(),
bayestestR::rope(), bayestestR::equivalence_test(),
parameters::model_parameter(), parameters::parameters_simulate()
Following plot() methods get priors and priors_alpha arguments, to add a
layer with prior samples to the plot: bayestestR::p_direction(),
bayestestR::estimate_density(), bayestestR::point_estimate()
More comprehensive examples available from the package-website.
Added new color-palettes.
Added plot-function for parameters::model_parameters().
Added plot-function for bayestestR::point_estimate().
The plot()-method for bayestestR::bayesfactor_savagedickey() gets a
rope_color and a rope_alpha-argument to plot the "null"-interval, when the
null-hypothesis is a region of practical equivalence, and not just the
point-null.
The plot()-method for performance::binned_residuals() now also allows to
modify size and colors of geoms (related arguments are in
performance::binned_residuals()).
geom_point2() now accepts size-aesthetics when mapped to data.
Themes now get a base_size and base_family argument, in line with
ggplot themes, to set the default size and family for plots.
plot()-methods now work for bayestestR functions that work on
emmGrid-objects (created from pairwise comparison with package
emmeans).
theme_lucid(), a light and clear theme.Added plot-function for performance::check_model().
Added plot-function for performance::check_normality().
Added plot-function for performance::check_heteroscedasticity().
Added plot-function for performance::check_outliers().
Added plot-function for performance::check_distribution().
Added plot-function for performance::check_collinearity().
Added plot-function for performance::check_homogeneity().
geom_poolpoint() and geom_pooljitter() to draw pool ball points (points
labelled with the observation name).