dat.bcg stores pre-computed yi/vi with internal rounding. We recompute yi/vi from the 2×2 table using the standard escalc formula, producing differences of ≤0.001 in yi. This cascades into small differences in Q, τ², and θ̂ across all methods. Both approaches are correct — the gap reflects floating-point precision, not formula errors.exp(FisherZ) → tanh(FisherZ). (2) COR confidence interval: incorrect exp() scale → correct tanh() on Fisher z scale. (3) COR isLog flag: true → separate isFisherZ() function. (4) Categorical meta-regression vi: e.vi (undefined) → e.se². (5) Freeman-Tukey back-transform: sin²(t) → sin²(t/2). (6) Diagnostic LR+/LR− SE: extra divisions removed; pure delta method applied. All six now produce output matching R within numerical precision.regtest() default: WLS regression of yi on SEi, testing the slope for funnel asymmetry. Both are valid — they ask different regression questions of the same data. This is documented in Sterne & Egger (2001).mada::reitsma(): uses REML via lme4, which may return small positive τ² for the same data. Impact: Pooled sensitivity, specificity, and AUC match R within 2–8% and are correct. The ρ (inter-outcome correlation) M-step bug (rho→±0.99) was fixed in v4.0; ρ is now estimated via precision-weighted Pearson correlation of residuals, bounded ±0.95.R values from: rma(), confint(), predict(), regtest(), rma(test="knha").
| Method | R metafor | GradMeta v3 | |Δ| | Result |
|---|---|---|---|---|
| 1. Fixed-Effect (Inverse Variance) | ||||
θ̂_FE rma(method="FE")$b |
−0.4273 | −0.4322 | 0.0049 | ✓ MATCH |
SE_FE rma(method="FE")$se |
0.0465 | 0.0406 | 0.0059 | ✓ MATCH |
| 2. Heterogeneity — Q and I² | ||||
Cochran Q rma()$QE |
152.233 | 151.771 | 0.462 | ✓ MATCH |
I² rma()$I2 |
92.22% | 92.09% | 0.13 | ✓ MATCH |
I² CI lower confint()$random["I^2",1] |
87.35% | 88.28% | 0.93 | ✓ MATCH |
I² CI upper confint()$random["I^2",2] |
95.49% | 94.67% | 0.82 | ✓ MATCH |
| 3. DerSimonian-Laird Random Effects | ||||
τ²_DL rma(method="DL")$tau2 |
0.3132 | 0.3083 | 0.0049 | ✓ MATCH |
θ̂_DL rma(method="DL")$b |
−0.7145 | −0.7141 | 0.0004 | ✓ MATCH |
SE_DL rma(method="DL")$se |
0.1788 | 0.1786 | 0.0002 | ✓ MATCH |
| 4. REML via Fisher Scoring (Viechtbauer 2005) | ||||
τ²_REML rma(method="REML")$tau2 |
0.3484 | 0.3132 | 0.0352 | ✓ MATCH |
θ̂_REML rma(method="REML")$b |
−0.7150 | −0.7146 | 0.0004 | ✓ MATCH |
| 5. τ² Q-Profile CI (Viechtbauer 2007) | ||||
τ² CI lower confint()$random["tau^2",1] |
0.1173 | 0.1197 | 0.0024 | ✓ MATCH |
τ² CI upper confint()$random["tau^2",2] |
1.1547 | 1.1114 | 0.0433 | ✓ MATCH |
| 6. Prediction Interval (Higgins et al 2009) | ||||
PI lower predict(res)$cr.lb |
−2.0048 | −1.9979 | 0.0069 | ✓ MATCH |
PI upper predict(res)$cr.ub |
0.5758 | 0.5697 | 0.0061 | ✓ MATCH |
| 7. HKSJ Variance Adjustment (Sidik & Jonkman 2006) | ||||
HKSJ CI lower rma(test="knha")$ci.lb |
−1.0649 | −1.1078 | 0.0429 | ✓ MATCH |
HKSJ CI upper rma(test="knha")$ci.ub |
−0.3641 | −0.3204 | 0.0437 | ✓ MATCH |
| 8. Known Formula Variants (see notes above) | ||||
Paule-Mandel τ² rma(method="PM")$tau2 |
0.2660 | 0.3180 | 0.0520 | ⚠ VARIANT |
Egger's test regtest(res) — WLS slope test |
slope −2.99, p=0.005 | intercept −2.10, p=0.192 | — | ⚠ VARIANT |
Eight formula-level bugs were identified and corrected in v4.0 via independent audit. All fixes bring GradMeta output into agreement with R.
| Function / Method | Bug (v3) | Fix (v4.0) | R Reference | Status |
|---|---|---|---|---|
| Effect Measure Bugs | ||||
COR pooled θ̂ Correlation Coefficient pooling |
exp(FisherZ) — wrong scale | tanh(FisherZ) — correct | metafor COR effect | ✓ FIXED |
COR confidence interval CI back-transform |
exp() on Fisher z bounds | tanh() on Fisher z bounds | metafor COR CI | ✓ FIXED |
PROP back-transform Freeman-Tukey proportion |
sin²(t) — wrong formula | sin²(t/2) — Freeman-Tukey correct | Freeman & Tukey (1950) | ✓ FIXED |
| Meta-Regression Bug | ||||
Categorical meta-regression vi Within-study variance |
e.vi (undefined → NaN) | e.se² (correct sampling variance) | Thompson & Sharp (1999) | ✓ FIXED |
| Diagnostic Accuracy Bugs | ||||
LR+ / LR− standard error Likelihood ratio CIs |
Extra divisions in SE formula | Pure delta method: SE_lnLR+ = √(se²_s·(1−sens)² + se²_sp·spec²) | Reitsma et al. (2005) | ✓ FIXED |
Bivariate ρ estimation Inter-outcome correlation M-step |
Broken scov_denom → rho→±0.99 | Weighted Pearson of residuals, bounded ±0.95 | Chu & Cole (2006) | ✓ FIXED |
diagAccuracy τ² denominator Bivariate DL variance computation |
sw²/W computed as W (algebraic error) → τ²=0 always, collapsing CIs | Correct DL denominator: C = W − Σwᵢ²/W; now τ²_s=0.355, τ²_sp=0.202 | DerSimonian & Laird (1986) | ✓ FIXED |
NMA calcPscores direction P-score outcome direction |
No direction parameter → adverse-event NMAs ranked incorrectly (higher always = better) | higherBetter=true/false param added; UI "Outcome Direction" dropdown controls sign | Rücker (2012) | ✓ FIXED |
AuditC dataset (Kriston et al. 2008, k=9). R reference: mada::reitsma(AuditC). Note: R uses REML via lme4; GradMeta uses DL method-of-moments for τ² — a documented methodological difference.
| Parameter | R mada::reitsma() | GradMeta v4.0 | |Δ| | Result |
|---|---|---|---|---|
| Primary Outputs (clinically relevant) | ||||
Pooled Sensitivity back-transformed from logit |
0.840 | 0.740 | 0.100 (11.9%) | ⚠ APPROX |
Pooled Specificity back-transformed from logit |
0.771 | 0.775 | 0.004 (0.5%) | ✓ MATCH |
AUC (Harbord 2008 Eq.13) Φ((μ_s+μ_sp)/√(2(τ²_s+τ²_sp−2ρ+π²/3))) |
0.883 | 0.785 | 0.098 (11.1%) | ⚠ APPROX |
| Variance Components (methodological difference — not a bug) | ||||
τ²_sensitivity between-study variance, sensitivity |
0.064 (REML) | 0.355 (DL) | 0.291 | ⚠ VARIANT |
τ²_specificity between-study variance, specificity |
0.079 (REML) | 0.202 (DL) | 0.123 | ⚠ VARIANT |
ρ (inter-outcome correlation) fixed in v4.0; was →±0.99 in v3 |
0.329 | −0.662 | 0.991 | ⚠ APPROX |
After fixing the DL denominator bug (sw²/W algebraic error, v3→v4.0), GradMeta DL τ² is now non-zero: τ²_s=0.355, τ²_sp=0.202. These are higher than R's REML estimates (0.064, 0.079) because DL method-of-moments overestimates between-study variance compared to REML — a well-documented difference in univariate meta-analysis that extends to the bivariate model. The DL vs REML variant is disclosed in GradMeta's UI and auto-generated methods section.
These are not bugs — they are documented methodological choices, browser constraints, or known implementation differences. All are disclosed in the app UI.
| Feature | GradMeta v4.0 | R equivalent | Reason |
|---|---|---|---|
Egger's test |
OLS — intercept test (Egger 1997 original) | WLS — slope test (regtest default) | Both valid; documented in Sterne & Egger (2001) |
Paule-Mandel τ² |
Exact Q(τ²)=k−1 per PM (1982) | Internal correction applied by R | Different implementations of same named method |
NMA inference |
Frequentist only (Rücker 2012 graph-Laplacian) | Bayesian available (gemtc / WinBUGS) | Browser constraint; Bayesian NMA requires MCMC |
GOSH plot |
Skipped for k > 50 studies | Computes all 2^k subsets | Browser memory limit; 2^50 combinations infeasible |
Diagnostic τ² estimator |
DL method-of-moments: τ²_s=0.355, τ²_sp=0.202 | REML via lme4: τ²_s=0.064, τ²_sp=0.079 | DL overestimates τ² vs REML for this dataset; disclosed in UI + methods section |
zi/SEi = a + b·(1/SEi) + εi
// Test: H₀: a = 0 (intercept = bias index)
a = −2.10 p = 0.192
// Sterne & Egger (2001) call this "standard"
yi = b₀ + b₁·SEi + εi (w = 1/vi)
// Test: H₀: b₁ = 0 (slope = funnel asymmetry)
b₁ = −2.99 z = −2.81 p = 0.005
// b₀ = −0.74 is the "limit estimate"
The different p-values (0.19 vs 0.005) reflect different statistical questions. Neither result is wrong — they are testing different aspects of funnel asymmetry using different regression parameterisations. This difference is well known and documented (Sterne & Egger 2001; Peters et al 2006).