### Show first 7 rows / 3 studies of the dataset
head(dat.dogliotti2014, 7)
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(treat = treatment, n = total, event = stroke,
studlab = study, data = dat.dogliotti2014, sm = "OR")
### Print log odds ratios (TE) and standard errors (seTE)
head(pw, 5)[, 1:5]
### Conduct network meta-analysis (NMA) with placebo as reference
net <- netmeta(pw, ref = "plac")
### Details on excluded study
selvars <- c("studlab", "event1", "n1", "event2", "n2")
subset(pw, studlab == "WASPO, 2007")[, selvars]
### Show network graph
netgraph(net, seq = "optimal", number = TRUE)
### Conduct Mantel-Haenszel NMA
net.mh <- netmetabin(pw, ref = "plac")
### Compare results of inverse variance and Mantel-Haenszel NMA
nb <- netbind(net, net.mh, random = FALSE,
name = c("Inverse variance", "Mantel-Haenszel"))
forest(nb, xlim = c(0.15, 2), at = c(0.2, 0.5, 1, 2))
### Print and plot results for inverse variance NMA
net
forest(net)
### Use previous settings
settings.meta(oldset)
}
Run the code above in your browser using DataLab