This function creates a histogram for each parameter in a coefs_dm
object,
resulting from a call to coef.fits_ids_dm.
Usage
# S3 method for class 'coefs_dm'
hist(
x,
...,
separate_plots = TRUE,
alpha = 0.5,
main = NULL,
colors = NULL,
xlab = "values"
)
Arguments
- x
an object of class
coefs_dm
(see coef.fits_ids_dm)- ...
additional arguments passed to the graphics::hist function.
- separate_plots
logical, indicating whether to display separate panels for each parameter in a single plot layout (
TRUE
), or to plot them sequentially (FALSE
).- alpha
numeric, specifying the transparency level for histogram colors when conditions are present, with values between 0 (fully transparent) and 1 (fully opaque).
- main
character vector, specifying titles for each parameter histogram. Defaults to parameter names.
- colors
character vector, specifying colors for each condition if conditions are present. Defaults to a rainbow color palette. If
NULL
and no conditions are present, the default color is"skyblue"
.- xlab
character, specifying the label for the x-axis.
Details
The hist.coefs_dm
function is designed for visualizing parameter
distributions for a single fit procedure.
If multiple conditions are present, it overlays histograms for each condition with adjustable transparency.
When separate_plots
is set to TRUE
, histograms for each parameter are
displayed in a grid layout within a single graphics device.
Examples
# get an auxiliary fit procedure result (see the function load_fits_ids)
all_fits <- get_example_fits_ids()
hist(coef(all_fits)) # only three participants in this fit_ids object
# allows for some customization
hist(coef(all_fits), colors = "lightgreen")