nma.forest: Forest Plot

View source: R/nma.forest.R

nma.forestR Documentation

Forest Plot

Description

Produces a forest plot of point estimates and 95% credible intervals obtained with the quantile method.

Usage

nma.forest(
  nma,
  comparator,
  central.tdcy = "median",
  order = NULL,
  log.scale = FALSE,
  lwd = 1,
  x.trans = NULL,
  cov.value = NULL
)

Arguments

nma

A BUGSnetRun object produced by running nma.run().

comparator

The treatment to use as a comparator

central.tdcy

The posterior statistic used in order to measure relative effectiveness. The options are "mean" and "median". Default is median.

order

Optional. A vector of strings representing the order in which to display the treatments.

log.scale

If TRUE, odds ratios, relative risk or hazard ratios are reported on the log scale. Default is FALSE.

lwd

Line width relative to the default (default=1).

x.trans

Optional. A string indicating a transformation to apply to the x-axis. Setting this parameter to "log" is useful when there are extreme values or to allow an easier interpretation of odds ratios and relative ratios (if e.g. treatment B is twice as far from the line y=1 then treatment A then it's OR/RR is twice that of treatment A.)

cov.value

Must be specified for meta-regression. This is the value of the covariate for which to report the results.

Value

forestplot - A forest plot.

See Also

nma.run, nma.league, nma.rank

Examples

data(diabetes.sim)

diabetes.slr <- data.prep(arm.data = diabetes.sim, 
varname.t = "Treatment", 
varname.s = "Study")

#Random effects, consistency model.
#Binomial family, cloglog link. This implies that the scale will be the Hazard Ratio.
diabetes.re.c <- nma.model(
  data = diabetes.slr,
  outcome = "diabetes", 
  N = "n",
  reference = "Placebo",
  family = "binomial",
  link = "cloglog",
  effects = "random",
  type = "consistency",
  time = "followup"
)

diabetes.re.c.res <- nma.run(
  model = diabetes.re.c,
  n.adapt = 100,
  n.burnin = 0,
  n.iter = 100
)

#make forest plot
nma.forest(nma = diabetes.re.c.res, comparator="Placebo")

audrey-b/BUGSnet documentation built on Feb. 2, 2025, 5:10 p.m.