plot_models {RoBMA} | R Documentation |
Models plot for a RoBMA object
Description
plot_models
plots individual models'
estimates for a "RoBMA"
object.
Usage
plot_models(
x,
parameter = "mu",
conditional = FALSE,
output_scale = NULL,
plot_type = "base",
order = "decreasing",
order_by = "model",
...
)
Arguments
x |
a fitted RoBMA object |
parameter |
a parameter to be plotted. Defaults to
|
conditional |
whether conditional estimates should be
plotted. Defaults to |
output_scale |
transform the effect sizes and the meta-analytic
effect size estimate to a different scale. Defaults to |
plot_type |
whether to use a base plot |
order |
how the models should be ordered.
Defaults to |
order_by |
what feature should be use to order the models.
Defaults to |
... |
list of additional graphical arguments
to be passed to the plotting function. Supported arguments
are |
Value
plot_models
returns either NULL
if plot_type = "base"
or an object object of class 'ggplot2' if plot_type = "ggplot2"
.
Examples
## Not run:
# using the example data from Anderson et al. 2010 and fitting the default model
# (note that the model can take a while to fit)
fit <- RoBMA(r = Anderson2010$r, n = Anderson2010$n, study_names = Anderson2010$labels)
### ggplot2 version of all of the plots can be obtained by adding 'model_type = "ggplot"
# the plot_models function creates a plot for of the individual models' estimates, for example,
# the effect size estimates from the individual models can be obtained with
plot_models(fit)
# and effect size estimates from only the conditional models
plot_models(fit, conditional = TRUE)
## End(Not run)