data("antidepressants")
#
pw <- pairwise(studlab = studyid, treat = drug_name,
n = ntotal, event = responders,
data = antidepressants, sm = "OR")
# Use subset to reduce runtime
pw <- subset(pw, studyid < 60)
#
net <- netmeta(pw, reference.group = "tra")
#
ranks <- tcc(net, swd = 1.20, small.values = "undesirable")
#
fit <- mtrank(ranks)
#
# Perform a sensitivity analysis across different SWD values assuming that
# 1.20 is the reference value
swd.vec <- seq(1.10, 1.50, by = 0.10)
swd.ref <- 1.20
# plot all the treatments in the network
linegraph(fit, swd = swd.vec, swd.ref = swd.ref)
# \donttest{
# plot only the first three treatments in the order appearing at the
# 'swd.ref' value
linegraph(fit, swd = swd.vec, swd.ref = swd.ref, k = 3)
# plot in terms of ability estimates
linegraph(fit, swd = swd.vec, swd.ref = swd.ref, type = "ability")
# }
Run the code above in your browser using DataLab