### Show first 6 rows / 3 studies of the dataset
head(dat.dong2013)
if (FALSE) {
### Load netmeta package
suppressPackageStartupMessages(library("netmeta"))
### Print odds ratios and confidence limits with two digits
oldset <- settings.meta(digits = 2)
### Change appearance of confidence intervals
cilayout("(", "-")
### Transform data from long arm-based format to contrast-based
### format. Argument 'sm' has to be used for odds ratio as summary
### measure; by default the risk ratio is used in the metabin function
### called internally.
pw <- pairwise(treatment, death, randomized, studlab = id,
data = dat.dong2013, sm = "OR")
### Calculated log odds ratios (TE) and standard errors (seTE)
pw[1:3, 1:9]
### Conduct Mantel-Haenszel network meta-analysis (NMA)
net <- netmetabin(pw, ref = "plac")
### Network graph
netgraph(net, seq = "optimal", col = "black", plastic = FALSE,
points = TRUE, pch = 21, cex.points = 3, col.points = "black",
bg.points = "gray", thickness = "se.fixed",
number.of.studies = TRUE)
### Show results for Mantel-Haenszel NMA
net
forest(net)
### League table with network estimates in lower triangle and direct
### estimates in upper triangle
netleague(net)
### Assess inconsistency
print(netsplit(net), show = "both", ci = TRUE, overall = FALSE,
nchar.trts = 6)
### Use previous settings
settings.meta(oldset)
}
Run the code above in your browser using DataLab