This function visualizes the results of a bias-corrected Bayesian nonparametric meta-regression. It plots the raw data with error bars, colors points based on the posterior probability of bias (I > 0.5), and adds the posterior mean regression line, the credible interval for the true effects, and the prediction interval for new observations, including its median line.
plotdata_reg.bcbnp(
object,
covariate,
title.plot = NULL,
ci.color = "green",
pi.color = "purple",
mean.line.color = "magenta",
pi.mean.line.color = "gray",
point.color.unbiased = "blue",
point.color.biased = "red",
show_ci = TRUE,
show_pi = TRUE,
errorbar_width = 0.25,
x.lab = covariate,
y.lab = "Treatment Effect (TE)",
legend.name = "Posterior Bias",
size.legend.name = "1/seTE",
label.unbiased = "Unbiased",
label.biased = "Biased"
)A ggplot object.
The output object from the bcbnp function.
A character string specifying the single covariate from the data to be plotted (e.g., `"baseline_va"`).
The title for the plot.
The color of the credible interval lines. Defaults to "green".
The color of the prediction interval lines. Defaults to "purple".
The color of the mean regression line. Defaults to "magenta".
The color of the prediction interval median line. Defaults to "gray".
The color of unbiased points. Defaults to "blue".
The color of biased points. Defaults to "red".
A logical value indicating whether to show the credible interval. Defaults to `TRUE`.
A logical value indicating whether to show the prediction interval. Defaults to `TRUE`.
The width of the error bars. Defaults to `0.25`.
A character string for the x-axis label. Defaults to the covariate name.
A character string for the y-axis label. Defaults to "Treatment Effect (TE)".
A character string for the color legend title. Defaults to "Posterior Bias".
A character string for the size legend title. Defaults to "1/seTE".
A character string for the label of the unbiased group. Defaults to "Unbiased".
A character string for the label of the biased group. Defaults to "Biased".