Plots a fitted zcurve_RoBMA
object, visualizing the z-curve, model fit, extrapolation, and credible intervals.
Usage
# S3 method for class 'zcurve_RoBMA'
plot(
x,
conditional = FALSE,
plot_type = "base",
probs = c(0.025, 0.975),
max_samples = 500,
plot_fit = TRUE,
plot_extrapolation = TRUE,
plot_CI = TRUE,
plot_thresholds = TRUE,
from = -6,
to = 6,
by.hist = 0.5,
length.out.hist = NULL,
by.lines = 0.05,
length.out.lines = NULL,
...
)
Arguments
- x
A zcurve_RoBMA object to be plotted.
- conditional
whether conditional estimates should be plotted. Defaults to
FALSE
which plots the model-averaged estimates. Note that both"weightfunction"
and"PET-PEESE"
are always ignoring the other type of publication bias adjustment.- plot_type
whether to use a base plot
"base"
or ggplot2"ggplot"
for plotting. Defaults to"base"
.- probs
quantiles of the posterior samples to be displayed. Defaults to
c(.025, .975)
- max_samples
Maximum number of posterior samples to use for plotting credible intervals. Defaults to 500.
- plot_fit
Should the model fit be included in the plot? Defaults to TRUE.
- plot_extrapolation
Should model extrapolation be included in the plot? Defaults to TRUE.
- plot_CI
Should credible intervals be included in the plot? Defaults to TRUE.
- plot_thresholds
Should significance thresholds be displayed in the plot? Defaults to TRUE.
- from
Lower bound of the z-value range for plotting. Defaults to -6.
- to
Upper bound of the z-value range for plotting. Defaults to 6.
- by.hist
Bin width for the histogram of observed z-values. Defaults to 0.5.
- length.out.hist
Number of bins for the histogram. If NULL, determined by by.hist. Defaults to NULL.
- by.lines
Step size for plotting model fit and extrapolation lines. Defaults to 0.05.
- length.out.lines
Number of points for plotting lines. If NULL, determined by by.lines. Defaults to NULL.
- ...
Additional arguments passed to the underlying plotting functions.
Examples
if (FALSE) { # \dontrun{
# 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, algorithm = "ss")
zcurve_fit <- as_zcurve(fit)
plot(zcurve_fit)
} # }