Learn R Programming

pcnetmeta (version 2.2.2)

contrast.plot: Contrast Plot of Relative Effect Sizes

Description

contrast.plot generates contrast plot, which shows 95% credible intervals (CIs) for relative effect sizes.

Usage

contrast.plot(nma.obj, effect.size, reference, digits = 2, width = 5, height)

Arguments

nma.obj
a list object obtained by function nma.ab, nma.ab.cont, nma.ab.py, or
effect.size
a character string indicating the relative effect size to be shown in the contrast plot. If nma.obj is obtained from nma.ab, this argument can be "OR" (default), "LOR",
reference
a character string indicating the reference treatment name to be compared against.
digits
an integer indicating the number of decimal places to be used for the point estimates and 95% CIs. The default is 2.
width
a positive number indicating the plot width. The default is 5.
height
a positive number indicating the plot height. The default is the treatment number minus 1.

Value

  • A contrast plot for relative effect sizes is saved as a .pdf file in users' current working directory.

Examples

Run this code
data(smoke)
# increase n.iter to reach convergence
# increase n.adapt to enhance efficiency
set.seed(1234)
nma.out <- nma.ab(s.id, t.id, r, n, data = smoke,
  trtname = c("NC", "SH", "IC", "GC"), param= "LOR",
  model = "het_cor", n.adapt = 400, n.iter = 100, n.chains = 1)
contrast.plot(nma.out)

Run the code above in your browser using DataLab