# NOT RUN {
### REPRODUCE THE RESULTS IN JACKSON ET AL. (2013)
# INSPECT THE DATA
hyp
# INPUT THE CORRELATION (CAN ALSO BE INPUTTED DIRECTLY, SEE BELOW)
(S <- inputcov(hyp[c("sbp_se", "dbp_se")], cor=hyp$rho))
# CHECK WITH THE FIRST STUDY
cov2cor(xpndMat(S[1,]))
# META-ANALYSIS, REML MODEL
mod1 <- mixmeta(cbind(sbp,dbp), S=S, data=hyp)
print(summary(mod1), digits=2)
round(mod1$Psi,2)
# META-ANALYSIS, REML MODEL (INPUTTING THE CORRELATION DIRECTLY)
mod2 <- mixmeta(cbind(sbp,dbp), S=cbind(sbp_se,dbp_se)^2, data=hyp,
control=list(Scor=hyp$rho))
print(summary(mod2), digits=2)
# META-ANALYSIS, MM MODEL
mod3 <- mixmeta(cbind(sbp,dbp), S=S, data=hyp, method="mm")
print(summary(mod3), digits=2)
round(mod3$Psi,2)
# META-REGRESSION, REML MODEL
mod4 <- mixmeta(cbind(sbp,dbp) ~ ish, S=S, data=hyp)
print(summary(mod4), digits=2)
# META-REGRESSION, MM MODEL
mod5 <- mixmeta(cbind(sbp,dbp) ~ ish, S=S, data=hyp, method="mm")
print(summary(mod5), digits=2)
# }
Run the code above in your browser using DataLab