Learn R Programming

pcnetmeta (version 2.8)

contrast.plot: Contrast Plot of Relative Effect Measures

Description

Generates a plot that shows 95% credible intervals (CIs) for relative effect measures.

Usage

contrast.plot(nma.obj, effect.measure, reference, digits = 2,
              save = TRUE, width = 5, height, network.name)

Value

None.

Arguments

nma.obj

a list object obtained by function nma.ab.bin, nma.ab.cont, nma.ab.py, or nma.ab.followup.

effect.measure

a character string specifying the relative effect measure to be shown in the contrast plot. If nma.obj is obtained from nma.ab.bin, this argument can be "OR" (the default), "LOR", "RR", "LRR", or "RD"; it can be also "OR.med" or "LOR.med" if they are specified in nma.ab.bin with link = "logit". If nma.obj is obtained from nma.ab.cont, this argument should be "diff" (the default). If nma.obj is obtained from nma.ab.py or nma.ab.followup, this argument can be "ratio" (the default) or "logratio". Note that the specified effect measures (or its logarithm/exponential) must have been estimated in nma.obj.

reference

a character string specifying the reference treatment name to be compared against.

digits

an integer specifying the number of decimal places to be used for the point estimates and 95% CIs. The default is 2.

save

a logical value indicating whether to save the plot as a .pdf file. If FALSE, a plot window will be displayed. The following arguments are only used when save = TRUE.

width

a positive number specifying the plot width. The default is 5.

height

a positive number specifying the plot height. The default is the treatment number minus 1.

network.name

a character string indicating the network name to be used for the produced .pdf file name.

Examples

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

Run the code above in your browser using DataLab