Learn R Programming

bayesmeta (version 3.4)

SidikJonkman2007: Postoperative complication odds example data

Description

This data set contains the outcomes from 29 randomized clinical trials comparing the odds of postoperative complications in laparoscopic inguinal hernia repair (LIHR) versus conventional open inguinal hernia repair (OIHR).

Usage

data("SidikJonkman2007")

Arguments

Format

The data frame contains the following columns:

idcharacteridentifier used in original publication by Memon et al. (2003)
id.sjnumericidentifier used by Sidik and Jonkman (2007)
yearnumericpublication year
lihr.eventsnumericnumber of events under LIHR
lihr.casesnumericnumber of cases under LIHR
oihr.eventsnumericnumber of events under OIHR
oihr.casesnumericnumber of cases under OIHR

Details

Analysis may be done based on the logarithmic odds ratios:

log(lihr.events) - log(lihr.cases-lihr.events) - log(oihr.events) + log(oihr.cases-oihr.events)

and corresponding standard errors:

sqrt(1/lihr.events + 1/(lihr.cases-lihr.events)) + 1/oihr.events + 1/(oihr.cases-oihr.events))

(you may also leave these computations to the metafor package's escalc() function).

The data set was used to compare different estimators for the (squared) heterogeneity \(\tau^2\). The values yielded for this data set were (see Tab.1 in Sidik and Jonkman (2007)):

method of moments (MM)0.429
variance component (VC)0.841
maximum likelihood (ML)0.562
restricted ML (REML)0.598
empirical Bayes (EB)0.703
model error variance (MV)0.818
variation of MV (MVvc)0.747

References

K. Sidik and J.N. Jonkman. A comparison of heterogeneity variance estimators in combining results of studies. Statistics in Medicine, 26(9):1964-1981, 2007. tools:::Rd_expr_doi("10.1002/sim.2688").

Examples

Run this code
data("SidikJonkman2007")
# add log-odds-ratios and corresponding standard errors:
sj <- SidikJonkman2007
sj <- cbind(sj, "log.or"=log(sj[,"lihr.events"])-log(sj[,"lihr.cases"]-sj[,"lihr.events"])
                             -log(sj[,"oihr.events"])+log(sj[,"oihr.cases"]-sj[,"oihr.events"]),
            "log.or.se"=sqrt(1/sj[,"lihr.events"] + 1/(sj[,"lihr.cases"]-sj[,"lihr.events"])
                             + 1/sj[,"oihr.events"] + 1/(sj[,"oihr.cases"]-sj[,"oihr.events"])))

if (FALSE) {
# analysis using weakly informative Cauchy prior
# (may take a few seconds to compute!):
ma <- bayesmeta(y=sj[,"log.or"], sigma=sj[,"log.or.se"], label=sj[,"id.sj"],
                tau.prior=function(t){dhalfcauchy(t,scale=1)})

# show heterogeneity's posterior density:
plot(ma, which=4, main="Sidik/Jonkman example", prior=TRUE)

# show some numbers (mode, median and mean):
abline(v=ma$summary[c("mode","median","mean"),"tau"], col="blue")

# compare with Sidik and Jonkman's estimates:
sj.estimates <- sqrt(c("MM"  = 0.429,   # method of moments estimator
                       "VC"  = 0.841,   # variance component type estimator
                       "ML"  = 0.562,   # maximum likelihood estimator
                       "REML"= 0.598,   # restricted maximum likelihood estimator
                       "EB"  = 0.703,   # empirical Bayes estimator
                       "MV"  = 0.818,   # model error variance estimator
                       "MVvc"= 0.747))  # a variation of the MV estimator
abline(v=sj.estimates, col="red", lty="dashed")

# generate forest plot:
fp <- forestplot(ma, exponentiate=TRUE, plot=FALSE)
# add extra columns for ID and year:
labtext <- fp$labeltext
labtext[1,1] <- "ID 2"
labtext[31:32,1] <- ""
labtext <- cbind(c("ID 1", SidikJonkman2007[,"id"], "mean","prediction"),
                 labtext[,1],
                 c("year", as.character(SidikJonkman2007[,"year"]), "", ""),
                 labtext[,-1])
# plot:
forestplot(ma, labeltext=labtext, exponentiate=TRUE, 
           xlog=TRUE, xlab="odds ratio", xticks=c(0.1,1,10))

}

Run the code above in your browser using DataLab