Trust Dossier · 01 · meta-analysis

drmTMB metafor glmmTMB

On three published meta-analysis datasets, drmTMB reproduces the estimates of metafor and glmmTMB — and fits a random-effect-in-dispersion model neither can, recovered from known truth. Evidence, not assertion.

S1 · multilevel
4.6×10⁻⁵
max diff vs metafor · dat.assink2016
S2 · bivariate
2.0×10⁻⁵
max diff vs metafor · dat.berkey1998
S3a · location-scale
2.7×10⁻⁵
max diff vs metafor · dat.bangertdrowns2004

The bar (Williams et al., arXiv:2604.04084): variance components to 5 dp, pooled effect to 6 dp. Every comparator slice clears it on the heterogeneity parameters; the pooled effect lands at 4–5 dp.

S1

Three-level multilevel meta-analysis

The headline. metafor rma.mv(~1 | study/esid), glmmTMB equalto, and drmTMB meta_V fit the identical model on 100 effects from 17 studies. This is the design Williams et al. use to validate equalto — with drmTMB added as a third column.

QuantitymetaforglmmTMBdrmTMBΔ max
μ  pooled effect 0.426799 0.426799 0.426796 3.3e-06
τ²  between-study (L3) 0.18787022 0.18787025 0.18787025 3.0e-08
σ²  within-study (L2) 0.11199209 0.11199198 0.11199200 1.0e-07
SE(μ) 0.118429 0.118475 0.118475 4.6e-05

MATCH Variance components agree to < 2×10⁻⁷, pooled effect to < 5×10⁻⁶. drmTMB and glmmTMB agree on SE (both TMB-based); metafor's differs at 4×10⁻⁵ by construction.

S2

Bivariate meta-analysis with known within-study covariance

metafor rma.mv (unstructured) vs drmTMB meta_vcov_bivariate on Berkey et al. (1998): 5 periodontal trials, two correlated outcomes (PD, AL).

QuantitymetafordrmTMBΔ
μ  PD0.3534280.3534451.7e-05
μ  AL-0.339215-0.3392352.0e-05
τ  PD (between-study SD)0.108319080.108319112.9e-08
τ  AL (between-study SD)0.180696760.180696803.9e-08
ρ  between-study0.608798580.608798913.4e-07

MATCH Between-study SDs and correlation agree to < 10⁻⁶; pooled means to < 3×10⁻⁵ (only 5 studies). No bivariate metafor comparator existed in the package before this dossier.

S3a

Location-scale: heterogeneity as a function of a moderator

Modelling the log-heterogeneity by school grade on 48 writing-to-learn studies. A genuine three-way: metafor rma(scale=) models log(τ²); glmmTMB dispformula and drmTMB sigma~x model log(σ). They coincide because log(τ²) = 2·log(σ) — shown on the metafor scale below.

log(τ²) coefficientmetaforglmmTMBdrmTMBΔ max
μ  location intercept0.2282060.2282060.2281782.7e-05
intercept-3.3443916-3.3443919-3.34439192.8e-07
grade 21.20691891.20692051.20691921.6e-06
grade 31.002776081.002775561.002776435.3e-07
grade 40.083284910.083285530.083285476.2e-07

MATCH All coefficients agree to < 3×10⁻⁵ after the log(τ²) = 2·log(σ) reconciliation.

S3b

Random effect in dispersion — the case no comparator can fit

sigma ~ 1 + (1 | study): the heterogeneity magnitude is itself a study-level random effect. metafor's scale= is fixed-effect only; glmmTMB's dispformula admits no random effects. Ground truth here is simulation, and the argument is recovery — not "trust us".

ParameterTruthMean estimateBiasMonte-Carlo SE
μ0.3000.3042+0.00420.0038
α₀ (log-heterogeneity intercept)-1.386-1.3643+0.02200.0146
SD of the dispersion RE0.5000.4797-0.02030.0161

RECOVERED No detectable bias over 30 replicates (every |bias| < 3·MCSE). A single-scenario demonstration — the calibrated coverage grid is commissioned to Totoro, not claimed here.

S4

Coverage smoke — a harness check, not the evidence

100 replicates of a Normal–Normal meta-analysis; Wald 95% interval coverage vs nominal. This proves the simulation harness runs and coverage lands near target — the calibrated grid (4 effect measures, wide DGP range, ≥2000 reps) runs on Totoro.

μ intercept
0.95
on target (±0.022)
μ slope
0.89
~2.7 SE low (±0.031)
σ heterogeneity
0.96
on target (±0.020)

SMOKE Intercept and σ land on 0.95; the slope sits ~2.7 SE low — consistent with Monte-Carlo noise across three parameters or mild Wald under-coverage. The Totoro grid resolves which. The tick marks 0.95.

Grid

The thousands-of-tests half — a broad coverage grid

A comparator on three datasets is the demonstration; this is the calibration. Four effect-measure regimes (SMD, lnRR, logOR, logIRR) crossed with study count, heterogeneity and sampling scale — 57,600 Wald 95% intervals over 48 DGP cells, each from a known truth. The question: does the interval cover at its nominal rate?

Wald intervals
57,600
4 measures · 48 cells · 400 reps
Mean coverage
0.93
near nominal · all four measures
τ² (heterogeneity)
0.91–0.93
mildly low at small n — as expected
Pooled Wald 95% coverage by effect-measure regime (4,800 intervals per parameter).
Measure regimeμ interceptμ slopeσ heterogeneity
SMD0.9310.9330.916
lnRR0.9310.9350.906
logOR0.9290.9310.934
logIRR0.9310.9310.924
Coverage climbs toward 0.95 as study count grows — pooled across all four measures.
Parametern = 20n = 40n = 80trend
μ intercept0.9170.9370.939→ nominal
μ slope0.9210.9350.941→ nominal
σ heterogeneity0.9010.9210.937→ nominal

HONEST Coverage runs 0.91–0.94, a few points under nominal — not a defect. This is the well-known conservatism of Wald intervals for the heterogeneity variance at small study counts (it is why metafor offers Q-profile CIs for τ²). It is uniform across all four effect measures and converges to 0.95 as studies accumulate — correct asymptotic behaviour. drmTMB's profile intervals close the finite-sample gap.

This is the local broad run (400 reps/cell). The publication-grade campaign — 768 cells × 2,000 reps, adding dense known-V and the type-I lane — runs on Totoro (inst/trust-dossier/totoro/), never GitHub Actions.

Scope

What this dossier does — and does not — claim

Established here

  • Multilevel, bivariate and location-scale MA estimates — match metafor & glmmTMB to < 3×10⁻⁵
  • Known within-study covariance — diagonal, dense, and row-paired bivariate
  • Random-effect-in-dispersion — recovered from known truth
  • Broad Wald-coverage grid — 57,600 intervals across 4 effect-measure regimes
  • Full reproducibility — one cold Rscript run.R, seed + SHA pinned

Deliberately not covered

  • Full calibrated campaign — 768 cells × 2,000 reps + dense-V coverage, on Totoro (D-50)
  • Type-I / power lanes — the null-effect grid is part of the Totoro campaign
  • Independent replication — that is trust level L3
  • logLik parity — a REML normalization constant differs; the claim is on estimates