Display the posterior probabilities of the individual models in a fitted model-averaged meta-analysis. Each column is one full model and its width is its posterior probability. Rows describe the model's fitted components.
Usage
plot_models(x, ...)
# S3 method for class 'RoBMA'
plot_models(
x,
parameter = NULL,
component = "auto",
predictor_view = "levels",
component_view = "inclusion",
group_labels = FALSE,
labels = NULL,
decreasing = TRUE,
col = NULL,
col_bias = NULL,
legend = FALSE,
legend_position = "bottom",
plot_type = "base",
...
)Arguments
- x
a fitted model-averaged object, such as a fit from
RoBMA()orBMA().- ...
additional arguments for methods.
- parameter
an ordered character vector of model component, term, or factor-level selectors. Use
NULLto show the model components, including random-effect rows, followed by the location and scale terms. Random-effect inclusion rows use the labels printed bysummary.brma()and appear before publication bias. Use qualified selectors such as"mu_year","log_tau_year", or"mu_delivery[online]"to disambiguate terms or levels.- component
component to select from:
"auto","mods"(also"location"),"scale","bias", or"random".- predictor_view
"levels"shows a row per fitted factor level and"terms"shows one neutral inclusion row per factor term. Supply a single setting or named overrides for individual terms. Unspecified terms use"levels".- component_view
display for main model components and random-effect gates.
"inclusion"(default) displays inclusion and, for the effect, direction."type"shows one row colored by the declared null or alternative hypothesis. For publication bias the types are no bias, selection models, and PET/PEESE."individual"shows a row for each declared prior or gate state, including null choices. Supply one setting for all components or named overrides such asc(effect = "individual", bias = "type"). Predictor rows are controlled independently bypredictor_view.- group_labels
whether to display group headings beside the rows.
- labels
named character vector of row label overrides. Use stable selectors such as
"mu","mu_year","mu_delivery[online]", or"bias[PET]"(when the mixture member is namedPET). Publication-bias priors and types use their own names. For other components, renaming a type row also updates its legend labels. Individual prior rows carry their own labels and omit the corresponding legend entries.- decreasing
whether to draw models in decreasing posterior probability order.
- col
named colors for
positive,negative,included, andexcluded. Defaults are blue, red, black, and white, respectively.- col_bias
named colors for
biasandno_bias. In the type view, no bias uses the excluded color by default. The keysselectionandpet_peeseoverride the generalbiascolor for their families. In the individual view, override a prior's color with its name fromsummary_models()or a qualified selector such as"bias[PET]". Qualify prior names that coincide withbiasorno_bias. This argument requires a displayed publication-bias component.- legend
whether to show the color legend.
- legend_position
show the legend in one row at
"bottom"or"top", or in one column at"left"or"right".- plot_type
"base"for base graphics or"ggplot"for ggplot2.
Value
Invisibly NULL for base graphics or a ggplot object for ggplot2.
The ggplot object has an integer n_rows attribute giving the number of
displayed rows after selection and expansion, excluding the group headings
and legend.
Details
The column widths come from the same joint indicator draws as
summary_models(x, type = "individual"). Choosing rows changes the
displayed information while keeping the fitted models and their widths.
Ungated coefficients can appear alongside the model components.
Select the main components by "effect", "heterogeneity", "bias", and
"heterogeneity_allocation"
for an available heterogeneity allocation mixture. Use qualified selectors
for moderators with those names.
Location predictor labels omit the (mu) prefix in fits without scale regression.
Inclusion uses the null or alternative assignment of the active prior member, or the fitted inclusion gate. In the inclusion view, directional colors indicate the sign of the posterior median within that full model on the fitted predictor scale. If the predictors were centered or standardized during fitting, intercept and moderator directions refer to that parameterization. Heterogeneity, heterogeneity allocation, publication bias, random-effect gates, whole factors, and coefficients with a median of zero use neutral inclusion colors. Factor level rows share the factor's inclusion gate. Treatment contrasts show coefficients relative to the reference level and omit the reference row. Mean-difference and orthonormal contrasts show deviations from the equally weighted mean of the factor levels.