## ## Version 4.9-5 or above of R package meta is needed to use lower and ## upper CI limits directly in R function metagen() ## ## At the moment (13-02-19), this version is only available on GitHub ## install.packages("devtools") devtools::install_github("guido-s/meta") ## Make R package meta available and ## - print results with two significant digits ## - use Cochrane layout for forest plots ## library(meta) settings.meta(digits = 2, layout = "RevMan5") ## Data from Steurer et al. (2006), Analysis 1.1 Overall survival ## https://www.cochranelibrary.com/cdsr/doi/10.1002/14651858.CD004270.pub2/abstract ## ## study <- c("FCG on CLL 1996", "Leporrier 2001", "Rai 2000", "Robak 2000") logHR <- c(-0.592, -0.0791, -0.237, 0.163) selogHR <- c(0.345, 0.0787, 0.144, 0.312) ## Conduct meta-analysis using log hazard ratios and standard errors ## m1 <- metagen(logHR, selogHR, studlab = study, sm = "HR") ## m1 ## forest(m1) grid::grid.text("Meta-analysis using log hazard ratios and standard errors", 0.5, 0.94, gp = grid::gpar(cex = 1.5)) ## Conduct meta-analysis using HRs and 95%-CIs ## HR <- c(0.55, 0.92, 0.79, 1.18) lower.HR <- c(0.28, 0.79, 0.59, 0.64) upper.HR <- c(1.09, 1.08, 1.05, 2.17) ## ## Input must be log hazard ratios, not hazard ratios ## m2 <- metagen(log(HR), lower = log(lower.HR), upper = log(upper.HR), studlab = study, sm = "HR") ## m2 ## forest(m2) grid::grid.text("Meta-analysis using hazard ratios and confidence limits", 0.5, 0.94, gp = grid::gpar(cex = 1.5))