| plot_weightfunction | R Documentation |
plot_weightfunction.brma visualizes the posterior
(and optionally prior) publication-bias weight function of a brma object.
plot_weightfunction(x, ...)
## S3 method for class 'brma'
plot_weightfunction(
x,
rescale_p_values = TRUE,
prior = FALSE,
plot_type = "base",
show_data = TRUE,
dots_data = NULL,
dots_prior = NULL,
...
)
x |
a fitted |
... |
list of additional graphical arguments
to be passed to the plotting function. Supported arguments
are |
rescale_p_values |
whether to rescale p-values to the interval shown
by the weightfunction plot. Defaults to |
prior |
whether prior distribution should be added to
figure. Defaults to |
plot_type |
whether to use a base plot |
show_data |
whether observed one-sided p-values should be shown as rug
marks on the weightfunction axis. Defaults to |
dots_data |
list of additional graphical arguments for observed
p-value rug marks. Supported arguments include |
dots_prior |
list of additional graphical arguments
to be passed to the plotting function of the prior
distribution. Supported arguments are |
plot_weightfunction.brma returns either NULL if
plot_type = "base" or a ggplot2 object if
plot_type = "ggplot".
The method errors for fitted objects without a weightfunction component.
RoBMA()
## Not run:
if (requireNamespace("metadat", quietly = TRUE)) {
data(dat.lehmann2018, package = "metadat")
fit <- bselmodel(
yi = yi,
vi = vi,
data = dat.lehmann2018,
measure = "SMD",
seed = 1,
silent = TRUE
)
plot_weightfunction(fit)
plot_weightfunction(fit, prior = TRUE)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.