data("Woods2010", package = "netmeta")
p1 <- pairwise(treatment, event = r, n = N, studlab = author,
data = Woods2010, sm = "OR")
net1 <- netmeta(p1, small.values = "good")
# criterionA if all treatments are in the exact defined order
criterionA <-
condition("sameHierarchy",
c("SFC", "Salmeterol", "Fluticasone", "Placebo"))
# criterionB respects the relative order of two or more treatments
criterionB <-
condition("retainOrder",
c("SFC", "Fluticasone", "Placebo"))
# Below we define the condition that SFC and Salmeterol are in the
# first two positions.
# We first define conditions that each one of them is in position 1
# or 2
criterionC1 <- condition("betterEqual", "SFC", 2)
criterionC2 <- condition("betterEqual", "Salmeterol", 2)
# We then combine them with operator %AND%
criterionC <- criterionC1 %AND% criterionC2
# Next we can feed the condition into nmarank to get the
# probability of the selection
nmarank(net1, criterionC,
text.condition =
"SFC and Salmeterol are the two best options", nsim = 100)
# We can further combine criteria
criterionD <- criterionA %AND% (criterionB %OR% opposite(criterionC))
Run the code above in your browser using DataLab