if (FALSE) {
# perform a meta-analysis using binary ("indicator") covariables;
# load data:
data("CrinsEtAl2014")
# compute effect measures (log-OR):
crins.es <- escalc(measure="OR",
ai=exp.AR.events, n1i=exp.total,
ci=cont.AR.events, n2i=cont.total,
slab=publication, data=CrinsEtAl2014)
# specify regressor matrix (binary indicator variables):
X <- cbind("basiliximab"=as.numeric(crins.es$IL2RA=="basiliximab"),
"daclizumab" =as.numeric(crins.es$IL2RA=="daclizumab"))
print(X)
# perform meta-analysis:
bmr01 <- bmr(crins.es, X=X,
tau.prior=function(t){dhalfnormal(t, scale=0.5)})
# show summary:
summary(bmr01)
# show summary with additional estimates and predictions:
summary(bmr01,
X.mean = rbind("basiliximab" = c(1,0),
"daclizumab" = c(0,1),
"difference" = c(-1,1)),
X.pred = rbind("basiliximab" = c(1,0),
"daclizumab" = c(0,1)))
# compute mean estimates
smry <- summary(bmr01,
X.mean = rbind("basiliximab" = c(1,0),
"daclizumab" = c(0,1),
"difference" = c(-1,1)))
# show mean estimates:
smry$mean
}
Run the code above in your browser using DataLab