This function is built with `ggplot2`. Parameters such as `binwidth`, `adjust`, `density.color`, `density.lwd`, and `density.lty` correspond directly to arguments in the `ggplot2` geoms.
# S3 method for bcbnp_0
plot(
x,
plot.type = "predictive",
n.samples = NULL,
x.lim = NULL,
y.lim = NULL,
x.lab = NULL,
y.lab = "Density",
title.plot = NULL,
show.histogram = TRUE,
show.rug = NULL,
binwidth = 0.08,
adjust = 1,
density.color = "blue",
hist.color = "black",
hist.fill = "grey95",
rug.color = "green",
rug.alpha = 1,
density.alpha = 0.2,
density.lwd = 1,
density.lty = 1,
...
)The object generated by the bcbnp_0 function (the BC-BNP model output).
A character string specifying the type of plot: - "predictive": Plots the posterior predictive distribution of a new study (unbiased density vs potentially biased histogram). - "mu_posterior": Plots the posterior of the overall mean (mu.theta). - "tau_posterior": Plots the posterior of the between-study standard deviation (tau.theta).
The number of posterior samples to plot. If NULL, all samples are used.
Numeric vector of length 2 specifying the x-axis limits.
Numeric vector of length 2 specifying the y-axis limits.
Text with the label of the x-axis.
Text with the label of the y-axis.
Text for setting a title in the plot.
A logical value indicating whether to show the histogram.
A logical value indicating whether to show the rug plot. Defaults to TRUE for predictive and mu plots, FALSE for tau.
A numeric value specifying the bin width for the histogram.
A numeric value for the density bandwidth adjustment.
A character value for the density curve color.
A character value for the histogram border color.
A character value for the histogram fill color.
A character value for the rug plot color.
A numeric value between 0 and 1 for the rug plot transparency.
A numeric value for the density curve transparency.
A numeric value for the density curve line width.
A numeric value for the density curve line type.
...