autoplot.confMeta: Visualizations of 'confMeta' objects

View source: R/autoplot_pfun.R

autoplot.confMetaR Documentation

Visualizations of confMeta objects

Description

Plot one or more confMeta objects. Currently, this function can create two types of plots, the p-value function as well as the forest plot. This allows to compare different p-value functions with each other.

Usage

## S3 method for class 'confMeta'
autoplot(
  ...,
  type = c("p", "forest"),
  diamond_height = 0.5,
  v_space = 1.5,
  scale_diamonds = TRUE,
  show_studies = TRUE,
  drapery = TRUE,
  reference_methods = c("re", "hk", "hc"),
  xlim = NULL,
  xlab = NULL
)

Arguments

...

One or more objects of class confMeta.

type

A character vector of length 1 or 2. Indicates what type of plot should be returned. Accepted is any combination of "p" and "forest". Defaults to c("p", "forest").

diamond_height

Numeric vector of length 1. Indicates the maximal possible height of the diamonds in the forest plot. Defaults to 0.5. This argument is only relevant if type contains "forest" and will be ignored otherwise.

v_space

Numeric vector of length 1. Indicates the vertical space between two diamonds in the forest plot. Defaults to 1.5. This argument is only relevant if type contains "forest" and will be ignored otherwise.

scale_diamonds

Logical vector of lenght 1. Accepted values are either TRUE (default) or FALSE. If TRUE, the diamond is rescaled to the interval [0, 1] in cases where the maximum of the p-value function is not equal to 1. This argument is only relevant if type contains "forest" and will be ignored otherwise.

show_studies

Logical vector of lenght 1. Accepted values are either TRUE (default) or FALSE. If TRUE, the forest plot shows the confidence intervals for the individual effect estimates. Otherwise, the intervals are suppressed. This argument is only relevant if type contains "forest" and will be ignored otherwise.

drapery

Either TRUE (default) or FALSE. If TRUE, the individual study effects are represented as drapery plots. If FALSE the studies are represented by a simple vertical line at their effect estimates.

reference_methods

A character vector of length 1, 2, 3 or 4. Denotes the reference methods that should be shown in the plot. Valid options are any combination of c("fe", "re", "hk", "hc") which stand for fixed effect meta-analysis, random effects meta-analysis, Hartung-Knapp and Henmi-Copas. Defaults to c("fe", "re", "hk", "hc").

xlim

Either NULL (default) or a numeric vector of length 2 which indicates the extent of the x-axis that should be shown.

xlab

Either NULL (default) or a character vector of length 1 which is used as the label for the x-axis.

Value

An object of class ggplot containing the specified plot(s).


felix-hof/hMean documentation built on Jan. 26, 2025, 4:59 p.m.