Validation
How we check our statistics
Every number below is worked out as you load this page, by the same code our free tools and Systeamatic use, beside the result the reference software gives for the same published example.
✓ All 33 numbers match their reference
Random-effects meta-analysis (REML)
The 13 BCG vaccine trials (Colditz et al., 1994), pooled as risk ratios.
Reference: metafor: rma(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg, method="REML")
| Number | Reference | Systeamatic | |
|---|---|---|---|
| Pooled log risk ratio | −0.7145 | −0.7145 | ✓ matches |
| Its standard error | 0.1798 | 0.1798 | ✓ matches |
| Risk ratio | 0.4894 | 0.4894 | ✓ matches |
| 95% CI, lower | 0.3441 | 0.3441 | ✓ matches |
| 95% CI, upper | 0.6962 | 0.6962 | ✓ matches |
| τ² | 0.3132 | 0.3132 | ✓ matches |
| Q | 152.2330 | 152.2330 | ✓ matches |
DerSimonian–Laird and fixed-effect models
The same trials, pooled with the other two models.
Reference: metafor: rma(…, method="DL") and rma(…, method="FE")
| Number | Reference | Systeamatic | |
|---|---|---|---|
| DerSimonian–Laird: log risk ratio | −0.7141 | −0.7141 | ✓ matches |
| DerSimonian–Laird: τ² | 0.3088 | 0.3088 | ✓ matches |
| Fixed effect: log risk ratio | −0.4303 | −0.4303 | ✓ matches |
| Fixed effect: standard error | 0.0405 | 0.0405 | ✓ matches |
| I² (%) | 92.12 | 92.12 | ✓ matches |
Prediction interval
Where a new trial's true risk ratio would likely fall, from the DerSimonian–Laird result: the estimate ± 1.96 × √(τ² + SE²).
Reference: statsmodels: combine_effects(…, method_re="chi2"), its estimate, standard error and τ²
| Number | Reference | Systeamatic | |
|---|---|---|---|
| 95% prediction interval, lower | 0.155960 | 0.155960 | ✓ matches |
| 95% prediction interval, upper | 1.537133 | 1.537133 | ✓ matches |
Hartung–Knapp adjustment
The DerSimonian–Laird result, adjusted for the uncertainty in τ², with the t distribution on 12 degrees of freedom.
Reference: statsmodels: combine_effects(y, v, method_re="chi2", use_t=True), the "random effect wls" row
| Number | Reference | Systeamatic | |
|---|---|---|---|
| Standard error | 0.180697 | 0.180697 | ✓ matches |
| 95% CI, lower (log) | −1.107821 | −1.107821 | ✓ matches |
| 95% CI, upper (log) | −0.320413 | −0.320413 | ✓ matches |
Egger's test
The regression test for funnel plot asymmetry (Egger et al., 1997).
Reference: statsmodels: OLS of y/se on 1/se; metafor: regtest(…, model="lm")
| Number | Reference | Systeamatic | |
|---|---|---|---|
| Intercept | −2.112042 | −2.112042 | ✓ matches |
| t | −1.401282 | −1.401282 | ✓ matches |
| p-value | 0.188707 | 0.188707 | ✓ matches |
Subgroup analysis
The trials grouped by how they allocated people, each group pooled with DerSimonian–Laird, then compared.
Reference: statsmodels: combine_effects(…, method_re="chi2") for each group, then Q between the groups
| Number | Reference | Systeamatic | |
|---|---|---|---|
| Random allocation: log risk ratio | −1.113756 | −1.113756 | ✓ matches |
| Alternate allocation: log risk ratio | −0.540793 | −0.540793 | ✓ matches |
| Systematic allocation: standard error | 0.229185 | 0.229185 | ✓ matches |
| Test for subgroup differences: Q | 1.795422 | 1.795422 | ✓ matches |
| Its p-value | 0.407501 | 0.407501 | ✓ matches |
Cohen's kappa
Two raters, 50 items: 20 and 15 agreed, 15 didn't.
Reference: statsmodels: cohens_kappa([[20, 5], [10, 15]])
| Number | Reference | Systeamatic | |
|---|---|---|---|
| Kappa | 0.400000 | 0.400000 | ✓ matches |
| Standard error | 0.126996 | 0.126996 | ✓ matches |
| 95% CI, lower | 0.151092 | 0.151092 | ✓ matches |
| 95% CI, upper | 0.648908 | 0.648908 | ✓ matches |
Weighted kappa
Three ordered categories (include, maybe, exclude), 100 items.
Reference: statsmodels: cohens_kappa(table, wt=None / "linear" / "quadratic")
| Number | Reference | Systeamatic | |
|---|---|---|---|
| Unweighted kappa | 0.622463 | 0.622463 | ✓ matches |
| Linear weights | 0.651112 | 0.651112 | ✓ matches |
| Quadratic weights | 0.675719 | 0.675719 | ✓ matches |
| Quadratic: standard error | 0.07392 | 0.07392 | ✓ matches |
About these checks
Numbers are compared to as many decimal places as the reference reports. The metafor results are those its documentation gives for the BCG example (Viechtbauer W. Conducting meta-analyses in R with the metafor package. Journal of Statistical Software 2010;36(3):1–48); the statsmodels and SciPy results were worked out with those packages. The same checks run as automated tests every time the code changes, so a change that broke one couldn't be released.
Try them yourself: the meta-analysis calculator opens with the BCG trials, and the forest plot maker, PRISMA diagram generator and kappa calculator are free too.