plot.cdmeta: Plot the predictive distribution from a cdmeta object

View source: R/cdmeta.R

plot.cdmetaR Documentation

Plot the predictive distribution from a cdmeta object

Description

Displays the Monte Carlo predictive distribution of the true effect in a future study and, optionally, its prediction interval.

Usage

## S3 method for class 'cdmeta'
plot(
  x,
  show_interval = TRUE,
  breaks = 40,
  main = NULL,
  xlab = NULL,
  hist_col = "grey85",
  border_col = "white",
  density_lwd = 2,
  pi_col = "firebrick",
  pi_lwd = 3,
  rug = FALSE,
  transf = NULL,
  transf_name = NULL,
  qtype = 8,
  ...
)

Arguments

x

An object of class "cdmeta".

show_interval

A logical value indicating whether a separate prediction- interval panel is shown below the predictive distribution.

breaks

Number of histogram breaks or another value accepted by graphics::hist().

main

Optional main title.

xlab

Optional x-axis label.

hist_col

Fill color of histogram bars.

border_col

Border color of histogram bars.

density_lwd

Line width of the kernel density curve.

pi_col

Color used for prediction-interval and predictive-estimate marks.

pi_lwd

Line width used for the prediction interval.

rug

A logical value indicating whether a rug of Monte Carlo draws is added.

transf

Optional transformation function for the predictive draws.

transf_name

Optional character string naming transf.

qtype

The quantile type used in stats::quantile(). Default is 8.

...

Additional arguments passed to graphics::hist().

Value

The input object x, invisibly.

Examples

data(hf_iron)
fit_hf <- cdmeta(hf_iron$yi, hf_iron$sei, B = 10000, seed = 11111)
plot(fit_hf)


cdmeta documentation built on Sept. 15, 2026, 5:09 p.m.