Learn R Programming

pcnetmeta (version 2.2.1)

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, left.margin = 0.5, width = 10, 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.
left.margin
a positive number to adjust the left margin of the plot. A higher value leads to a wider left margin. The default is 0.5.
width
a positive number indicating the plot width. The default is 10.
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
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 = 0, n.iter = 100, n.chains = 1)
contrast.plot(nma.out)
# use getwd() to find the path of generated contrast plot

Run the code above in your browser using DataLab