diff --git a/DESCRIPTION b/DESCRIPTION index ac6e3e8312ec25dd9ac0a9cdcd01d924bfe6bca3..010b0036f4650a19f2c8453298fedbda230eccc6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: bayesmeta Type: Package Title: Bayesian Random-Effects Meta-Analysis and Meta-Regression Version: 2.8 -Date: 2021-08-23 +Date: 2021-08-31 Authors@R: c(person(given="Christian", family="Roever", role=c("aut","cre"), email="christian.roever@med.uni-goettingen.de", comment=c(ORCID="0000-0002-6911-698X")), diff --git a/data/BucherEtAl1997.R b/data/BucherEtAl1997.R new file mode 100644 index 0000000000000000000000000000000000000000..ac3c275a8e1222c9293a4f260b20a020a60a676f --- /dev/null +++ b/data/BucherEtAl1997.R @@ -0,0 +1,36 @@ +# Data from: +# +# H. C. Bucher et al. +# The results of direct and indirect treatment comparisons +# in meta-analysis of randomized controlled trials +# Journal of Clinical Epidemiology, 50(6):683-691, 1997. +# https://doi.org/10.1016/S0895-4356(97)00049-8 +# +# Table 1 +# + +BucherEtAl1997 <- cbind.data.frame("study" =c("Antinori (1992)", "Mallolas (1992)", "Tocchetti (1994)", + "Bozzette (1995)", "Blum (1995)", "Podzamczer (1993)", + "Podzamczer (1995)", "Sirera (1995)", + "Slavin (1992)", "Girard (1993)", "Torres (1993)", + "Opravil (1995)", "Salmon (1995)", + "Rozenbaum (1991)", "Hardy (1992)", "Schneider (1992)", + "Smith (1992)", "Michelet (1993)", "May (1993)", + "Stellini (1994)", "Nielsen (1995)", "Rizzardi (1995)"), + "treat.A" =factor(rep(c("TMP-SMX", "AP", "TMP-SMX"), c(8,5,9)), + levels=c("TMP-SMX", "D/P", "AP")), + "treat.B" =factor(rep(c("D/P", "D/P", "AP"), c(8,5,9)), + levels=c("TMP-SMX", "D/P", "AP")), + "events.A"=c(1, 3, 0, 42, 1, 3, 0, 6, + 8, 10, 15, 13, 12, + 0, 14, 0, 3, 1, 2, 0, 1, 5), + "total.A" =c(66, 107, 15, 276, 39, 81, 104, 115, + 46, 176, 152, 242, 102, + 29, 154, 142, 27, 53, 108, 26, 47, 95), + "events.B"=c(9, 8, 1, 41, 1, 13, 6, 9, + 9, 10, 15, 12, 5, + 1, 36, 6, 6, 4, 5, 2, 8, 6), + "total.B" =c(63, 116, 15, 288, 47, 85, 96, 105, + 50, 173, 126, 291, 92, + 27, 156, 71, 26, 55, 106, 23, 48, 101), + stringsAsFactors=FALSE) diff --git a/man/BucherEtAl1997.Rd b/man/BucherEtAl1997.Rd new file mode 100644 index 0000000000000000000000000000000000000000..fa221f9250f3b6eedf9fb7c8f4a2a9959f8d80dc --- /dev/null +++ b/man/BucherEtAl1997.Rd @@ -0,0 +1,104 @@ +\name{BucherEtAl1997} +\docType{data} +\alias{BucherEtAl1997} +\title{Direct and indirect comparison example data} +\description{Numbers of subjects and events in the different treatment arms of 22 studies.} +\usage{data("BucherEtAl1997")} +\format{The data frame contains the following columns: + \tabular{lll}{ + \bold{study} \tab \code{character} \tab publication identifier (first author and publication year) \cr + \bold{treat.A} \tab \code{factor} \tab treatment in first study arm (\dQuote{TMP-SMX} or \dQuote{AP}) \cr + \bold{treat.B} \tab \code{factor} \tab treatment in second study arm (\dQuote{D/P} or \dQuote{AP}) \cr + \bold{events.A} \tab \code{numeric} \tab number of events in first study arm \cr + \bold{events.B} \tab \code{numeric} \tab number of events in second study arm \cr + \bold{total.A} \tab \code{numeric} \tab total number of patients in first study arm \cr + \bold{total.B} \tab \code{numeric} \tab total number of patients in second study arm \cr + } +} +\details{Bucher \emph{et al.} (1997) discussed the example case of the + comparison of \emph{sulphametoxazole-trimethoprim (TMP-SMX)} versus + \emph{dapsone/pyrimethamine (D/P)} for the prophylaxis of + \emph{Pneumocystis carinii} pneumonia in HIV patients. Eight + studies had undertaken a head-to-head comparison of both medications, + but an additional 14 studies were available investigating one of the + two medications with \emph{aerosolized pentamidine (AP)} as a + comparator. Nine studies compared TMP-SMX vs. AP, and five studies + compared D/P vs. AP. Together these provide \emph{indirect} evidence + on the effect of TMP-SMX compared to D/P. + + The example constitutes a simple case of a \emph{network meta-analysis + (NMA)} setup, where only two-armed studies are considered, and + analysis is based on pairwise comparisons of treatments (or + \emph{contrasts}). In this case, the joint analysis of \emph{direct} + and \emph{indirect} evidence may be implemented as a special case of a + meta-regression (Higgins \emph{et al.}, 2019; Sec. 11.4.2). + The original data in fact included some three-armed studies, in which + case one of the arms was deliberately omitted (Bucher \emph{et al.}; 1997). +} +\source{H.C. Bucher, G.H. Guyatt, L.E. Griffith, S.D. Walter. + The results of direct and indirect treatment comparisons + in meta-analysis of randomized controlled trials. + \emph{Journal of Clinical Epidemiology}, \bold{50}(6):683-691, 1997. + \doi{10.1016/S0895-4356(97)00049-8}. +} +\references{J.P.T. Higgins, J. Thomas, J. Chandler, M. Cumpston, T. Li, + M.J. Page, V.A. Welch (eds.). + \emph{Cochrane handbook for systematic reviews of interventions}. + Wiley and Sons, 2nd edition, 2019. + \doi{10.1002/9781119536604}. + \url{http://handbook.cochrane.org/}. +} +\examples{ +# load data: +data("BucherEtAl1997") + +# show data: +head(BucherEtAl1997) + +\dontrun{ +# compute effect sizes (log-ORs for pairwise comparisons) +# from the count data: +es <- escalc(measure="OR", + ai=events.A, n1i=total.A, # "exposure group" + ci=events.B, n2i=total.B, # "control group" + slab=study, data=BucherEtAl1997) + +# specify regressor matrix: +X <- cbind("TMP.DP" = rep(c(1, 0, 1), c(8,5,9)), + "AP.DP" = rep(c(0, 1,-1), c(8,5,9))) + +# perform Bayesian meta-regression: +bmr01 <- bmr(es, X=X) + +# show default output: +print(bmr01) + +# specify contrast matrix: +contrastX <- rbind("TMP-SMX vs. D/P"=c(1,0), + "AP vs. D/P" =c(0,1), + "TMP-SMX vs. AP" =c(1,-1)) +# show summary including contrast estimates: +summary(bmr01, X.mean=contrastX) +# show forest plot including contrast estimates: +forestplot(bmr01, X.mean=contrastX, xlab="log-OR") + + +# perform frequentist meta-regression: +fmr01 <- rma(es, mods=X, intercept=FALSE) +print(fmr01) + +# compare Bayesian and frequentist results; +# estimated log-OR for "TMP-SMX" vs. "D/P" +rbind("bayesmeta"=bmr01$summary[c("mean","sd"),"TMP.DP"], + "rma" =c(fmr01$beta["TMP.DP",], fmr01$se[1])) + +# estimated log-OR for "AP" vs. "D/P" +rbind("bayesmeta"=bmr01$summary[c("mean","sd"),"AP.DP"], + "rma" =c(fmr01$beta["AP.DP",], fmr01$se[2])) + +# estimated heterogeneity: +rbind("bayesmeta"=bmr01$summary["median","tau"], + "rma" =sqrt(fmr01$tau2)) +} +} +\keyword{datasets} diff --git a/man/bayesmeta-package.Rd b/man/bayesmeta-package.Rd index 4847ef35aa3a84bef2a7ced86a1c1b6066ff8223..af8ef2a78336eb80294caee4b527797f5b97a5e8 100644 --- a/man/bayesmeta-package.Rd +++ b/man/bayesmeta-package.Rd @@ -17,7 +17,7 @@ Package: \tab bayesmeta\cr Type: \tab Package\cr Version: \tab 2.8\cr - Date: \tab 2021-08-23\cr + Date: \tab 2021-08-31\cr License: \tab GPL (>=2) } The main functionality is provided by the \code{\link{bayesmeta}()}