### Show full dataset
dat.woods2010
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, event = r, n = N,
studlab = author, data = dat.woods2010, sm = "OR")
pw
### Conduct network meta-analysis
net <- netmeta(pw)
net
### Show forest plot
forest(net, ref = "Placebo", drop = TRUE,
leftlabs = "Contrast to Placebo")
### Use previous settings
settings.meta(oldset)
}
Run the code above in your browser using DataLab