data(smokingcessation)
# Add variable with (fictitious) risk of bias values
# with 1 = "low risk" and 2 = "high risk"
#
smokingcessation$rob <- rep(1:2, 12)
pw1 <- pairwise(list(treat1, treat2, treat3),
event = list(event1, event2, event3), n = list(n1, n2, n3),
data = smokingcessation, sm = "OR")
net1 <- netmeta(pw1, common = FALSE, ref = "A")
# Generate network graph with information on risk of bias
#
col.rob <- netmatrix(net1, rob, ties.method = "last",
levels = 1:2, labels = c("green", "yellow"))
#
netgraph(net1, col = col.rob, cex.points = 5,
bg.points = "gray", adj = 0.5,
pos.number.of.studies = c(0.5, 0.25, 0.5, 0.5, 0.25, 0.5))
netgraph(net1, col = col.rob, cex.points = n.trts,
bg.points = "blue", labels = paste0(trts, " (n=", n.trts, ")"),
pos.number.of.studies = c(0.5, 0.25, 0.5, 0.5, 0.25, 0.5),
offset = c(0.05, 0.035, 0.05, 0.025))
Run the code above in your browser using DataLab