data(antidepressants)
#
pw1 <- pairwise(studlab = studyid, treat = drug_name,
n = ntotal, event = responders,
data = antidepressants, sm = "OR")
# Use subset to reduce runtime
pw0 <- subset(pw1, studyid < 60)
#
net0 <- netmeta(pw0, reference.group = "tra")
#
ranks0 <- tcc(net0, swd = 1.20, small.values = "undesirable")
#
fit0 <- mtrank(ranks0)
#
fitted(fit0, type = c("better", "worse"),
treat1 = "bupropion", treat2 = "escitalopram")
#
fitted(fit0, type = c("better", "worse"),
treat1 = "escitalopram", treat2 = "bupropion")
#
fitted(fit0, type = "all",
treat1 = c("bupropion", "escitalopram"),
treat2 = c("escitalopram", "bupropion"))
if (FALSE) {
# Run analysis with full data set
net1 <- netmeta(pw1, reference.group = "tra")
#
ranks1 <- tcc(net1, swd = 1.20, small.values = "undesirable")
#
fit1 <- mtrank(ranks1)
#
fitted(fit1, type = c("better", "worse"),
treat1 = "bupropion", treat2 = "escitalopram")
#
fitted(fit1, type = c("better", "worse"),
treat1 = "escitalopram", treat2 = "bupropion")
#
fitted(fit1, type = "all",
treat1 = c("bupropion", "escitalopram"),
treat2 = c("escitalopram", "bupropion"))
}
Run the code above in your browser using DataLab