[R-meta] Mixed effects meta-analysis model selection with glmulti
Bronwen Stanford
bronwenstanford at gmail.com
Wed Oct 11 18:38:35 CEST 2017
I would like to perform model selection on a meta-analysis model with mixed
effects, using rma.mv from metafor and the glmulti package. Code was
provided for doing this with fixed effects (
http://www.metafor-project.org/doku.php/tips:model_selection_with_glmulti)
but I can't figure out how to modify the code to work with multilevel
models.
I've tried
rma.glmulti <- function(formula, data, ...) {
rma.mv(formula, vi, data=data, method="ML",random=random)
}
but it creates errors
I'm also not sure whether I would need to modify the second part of the
code
setOldClass("rma.mv")
setMethod('getfit', 'rma.mv', function(object, ...) {
if (object$test=="z") {
cbind(estimate=coef(object), se=sqrt(diag(vcov(object))), df=100000)
} else {
cbind(estimate=coef(object), se=sqrt(diag(vcov(object))),
df=object$k-object$p)
}
})
Any help you can provide would be really appreciated!
Thank you
Bronwen
[[alternative HTML version deleted]]
More information about the R-sig-meta-analysis
mailing list