我想将参考“线”Pl 移动到绘图的顶部,因此顺序为“PL”、“C”、“Pr”、“T”
event <- c(664, 677, 295 , 407, 2255, 2435, 717, 831, 130, 130, 864, 849, 231, 178, 1222, 632, 76, 51,
177, 202, 1825, 1943, 723, 815, 188, 186, 175, 154, 124, 116, 542, 578,
103, 86, 942, 918, 149, 160, 276, 269, 404, 427, 789, 892)
n <- c(7802, 7801, 1752, 1739, 22961, 22891, 6259, 6303, 713, 730, 6930, 6955, 2012, 2006, 14095,
7067, 401, 400, 819, 812, 9333, 9291, 3820, 3825, 621, 616, 707, 706, 641, 628, 2725,
2704, 502, 501, 9619, 9601, 1913, 1886, 1043, 1040, 3620, 3623, 6813, 6795)
studlab <- rep(LETTERS[1:22], each=2)
treatment <- c("C", "Pl", "C", "Pl", "C", "Pl", "C", "Pl", "Pr", "C", "T", "C", "T", "Pr", "T", "Pl", "T",
"C", "T", "C", "T", "C", "T", "C", "T", "C", "T", "C", "T", "C", "T", "C",
"T", "C", "T", "Pl", "T", "C", "Pr", "C", "Pr", "C", "Pr", "C")
temp <- data.frame(studlab = studlab, event = event, n = n, treatment = treatment)
library(gemtc)
library(netmeta)
temp <- pairwise(treatment, event = event, n = n, studlab = studlab, data = temp, sm ="OR" )
network_bin_re <- netmeta(TE, seTE, treat1, treat2, studlab, data=temp, sm="OR", reference="Pl",
comb.fixed=FALSE, comb.random=TRUE)
forest(network_bin_re, ref = "Pl", digits=3, xlab = "Odds Raio")