Plot main effects of multiple parameters on an outcome (violin/box/jitter)
Source:R/plot_main_effects.R
plot_main_effects.RdCreates a facetted overview plot showing the distribution of an outcome
(for example n_overflows) across the tested levels of multiple varied
parameters. Parameters are sorted by a simple effect-size proxy: the range of
median outcome values across parameter levels.
Usage
plot_main_effects(
df,
y = "n_overflows",
params,
max_levels = 25,
ylim_lower = 0,
lang = c("de", "en")
)Arguments
- df
A data.frame or tibble containing the outcome column
yand the parameter columns listed inparams.- y
Character scalar. Name of the outcome column to plot on the y-axis. Defaults to
"n_overflows".- params
Character vector of parameter column names in
dfto consider.- max_levels
Integer. Parameters with more than
max_levelsdistinct values are dropped to keep the plot readable. Defaults to 25.- ylim_lower
Numeric scalar or
NULL. Optional lower display limit for the y-axis. Usesggplot2::coord_cartesian(), so data are not removed before computing violin and boxplots. Defaults to0.- lang
Character. Plot language:
"de"or"en".