Meta-analysis with the glmmTMB R package

📅 2026-04-05
📈 Citations: 0
Influential: 0
📄 PDF

career value

205K/year
🤖 AI Summary
This study addresses a key limitation of the glmmTMB package, which traditionally cannot incorporate known sampling variances of effect sizes in meta-analysis, thereby restricting its utility in evidence synthesis. We introduce, for the first time, the equalto covariance structure within glmmTMB, enabling users to specify known sampling error variance–covariance matrices and explicitly model heteroscedasticity and dependencies among sampling errors. Implemented in R using the glmmTMB and Template Model Builder (TMB) framework, this approach allows direct fitting of generalized linear mixed models with known sampling variances. Simulation studies confirm that parameter estimates align exactly with those from the widely used metafor package. The method has been successfully applied to real-world meta-analyses across medicine, evolutionary ecology, and social sciences, substantially expanding the applicability of glmmTMB in meta-analytic research.

Technology Category

Application Category

📝 Abstract
Meta-analytical models are typically formulated as a mixed-effects model where the sampling variances of the effect sizes are treated as known. In principle, such models could be fitted with standard mixed-modelling software such as the glmmTMB R package. This general-purpose package for generalized linear mixed models (GLMMs) provides flexibility in distributions and random effect covariance structures through the Template Model Builder (TMB). However, incorporating known sampling variances in the conventional inverse-variance formulation of meta-analysis was previously not easily accomplished in glmmTMB. Here, we introduce equalto, a new covariance structure in glmmTMB that allows users to supply a known sampling error variance-covariance matrix when fitting meta-analytic models. This enables explicit modelling of heteroscedasticity and dependence among sampling errors. The new implementation provides an alternative way to fit meta-analytic models, convenient for users already familiar with glmmTMB. Using simulations, we show that the new implementation produces model estimates identical to those from the established metafor package and illustrate its applicability with published meta-analyses in medicine, evolutionary ecology, and the social sciences. Further, this novel implementation in glmmTMB supports more flexible modelling of meta-analytical data, expanding the R toolkit available for evidence synthesis.
Problem

Research questions and friction points this paper is trying to address.

meta-analysis
glmmTMB
sampling variance
heteroscedasticity
covariance structure
Innovation

Methods, ideas, or system contributions that make the work stand out.

glmmTMB
meta-analysis
equalto covariance structure
sampling variance
heteroscedasticity
🔎 Similar Papers
No similar papers found.
C
Coralie Williams
Evolution & Ecology Research Centre, UNSW, Sydney, 2052, NSW, Australia; School of Mathematics and Statistics, UNSW, Sydney, 2052, NSW, Australia
M
Maeve McGillycuddy
Stats Central, Mark Wainwright Analytical Centre, UNSW, Sydney, 2052, NSW, Australia
M
Mollie Brooks
National Institute of Aquatic Resources, Danish Technical University, Kongens Lyngby, 2800, Denmark
B
Benjamin M. Bolker
Department of Mathematics & Statistics, McMaster University, Hamilton, Ontario, Canada; Department of Biology, McMaster University, Hamilton, Ontario, Canada
A
Ayumi Mizuno
Department of Biological Sciences, Faculty of Science, The University of Alberta, Edmonton, Alberta, Canada
Y
Yefeng Yang
Evolution & Ecology Research Centre, UNSW, Sydney, 2052, NSW, Australia; Department of Biosystems Engineering, Zhejiang University, Hangzhou, Zhejiang, China
W
Wolfgang Viechtbauer
Department of Psychiatry and Neuropsychology, Maastricht University, Maastricht, The Netherlands
D
David I. Warton
Evolution & Ecology Research Centre, UNSW, Sydney, 2052, NSW, Australia; School of Mathematics and Statistics, UNSW, Sydney, 2052, NSW, Australia
Shinichi Nakagawa
Shinichi Nakagawa
Canada Excellence Research Chair, University of Alberta, UNSW
Evolutionary EcologyBehavioural EcologyAnimal BehaviourMeta-analysisBiostatistics