plot.zcurve_RoBMA | R Documentation |
Plots a fitted zcurve_RoBMA
object, visualizing the z-curve, model fit, extrapolation, and credible intervals.
## 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,
...
)
x |
A zcurve_RoBMA object to be plotted. |
conditional |
whether conditional estimates should be
plotted. Defaults to |
plot_type |
whether to use a base plot |
probs |
quantiles of the posterior samples to be displayed.
Defaults to |
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. |
Returns NULL
if plot_type = "base"
, or a ggplot2
object if plot_type = "ggplot2"
.
as_zcurve()
, lines.zcurve_RoBMA()
, hist.zcurve_RoBMA()
## 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, algorithm = "ss")
zcurve_fit <- as_zcurve(fit)
plot(zcurve_fit)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.