BCompare groups · Guide test 281
Egger regression asymmetry test
Tests association between effect estimates and their precision; asymmetry does not uniquely establish publication bias.
Do it in CodeSplash
In the app, set it up in Analyze with this method:
- Small-study effects and publication bias — Do smaller studies report systematically different effects, as publication bias would cause?
In Small-study effects and publication bias, choose Egger test = Classic (standardized effect on precision, t test) or choose Egger test = Meta-regression on the standard error (z test).
Do it in CodeSplash Run this test on your own data, in Python or R.
Bench
Change the design, drag the data, move α. The statistic, its reference distribution and the verdict follow.
Bench · Egger regression asymmetry test
Adds bias × SE: small studies report bigger effects.
Your data
Simulated with a known ρIf H₀ were true
- The reference: how t varies across samples when H₀ is true.
- Your statistic, from the data above.
- The p-value: the area at least as extreme as yours (p = .002).
- The hatched rejection region at α = .050: statistics landing here reject H₀.
The formula
With your numbers
- intercept: zero for a symmetric funnel
- standardized effect
The verdict
t(12) = 3.83, p = .002
p ≤ α = .050: reject H₀
Funnel asymmetry can come from publication bias, but also from heterogeneity or chance. Needs ≥ 10 studies. The formula is the classic test (Egger: Classic, the default). The guide's R example uses metafor's regtest default, which is the Meta-regression on the standard error choice.
- Statistic
- 3.834
- p-value
- 0.0024
Egger regression asymmetry test on 14 (x, y) pairs: t(12) = 3.83, p = .002. The p-value is below α = .050, so the data are hard to reconcile with H₀.
Question and hypotheses
H0: no small-study asymmetry in the specified meta-regression.
Assumptions
Independent effect estimates, meaningful standard errors and an appropriate effect-scale regression; adequate study count.
Formula
Parameters and notation
yi effects,si standard errors; classical Egger uses an intercept test in standardized effect versus precision regression. Weighted effect-scale variants exist.
Structure of the method
Regress standardized effects on precision and test the intercept in the classical formulation; equivalently, a weighted effect-scale regression includes standard error as a predictor. Package variants can instead fit mixed-effects meta-regression, so the regression family determines the tested coefficient, weights and reference distribution.
Estimated and nuisance parameters
Estimate the asymmetry coefficient, underlying intercept/slope and residual scale; mixed-effects variants may additionally estimate τ². Standard errors are themselves estimated study quantities and can correlate mechanically with certain effect measures, which influences the scientific interpretation of the regression.
Settings and design choices
Specify predictor, effect scale, regression family, heterogeneity treatment and directional alternative. The baseline model="rma", predictor="sei" is the mixed-effects variant, not the classical multiplicative-dispersion regression selected by model="lm". This distinction should accompany the printed test statistic.
Fitting and adaptation
Fit a prespecified regression and inspect funnel plots and influential studies. With substantive moderators, consider the documented residual/meta-regression formulation rather than treating known heterogeneity as bias. There is no neural fine-tuning; changing the asymmetry model changes the diagnostic and needs justification.
Sensitivity and robustness
Few studies provide limited power, and a single imprecise influential study can drive the slope. Selection, genuine effect modification, measurement quality and mathematical effect-SE dependence can all cause asymmetry. Report it as a small-study-effect diagnostic, not proof of publication bias or a correction of the pooled effect.
How to use and calibrate
Use the regression’s t/Wald inference, stating heterogeneity and weighting treatment.
Example application
Investigate funnel-plot asymmetry across studies.
Interpretation and pitfalls
Watch out
Asymmetry is not proof of publication bias; heterogeneity, selection and effect-SE dependence can also cause it. Small study counts limit power.
What changed in edition 2
- New sections: structure of the method, estimated and nuisance parameters, settings and design choices, fitting and adaptation, sensitivity and robustness.
- Rewritten in the review: example application.
Example applicationwviechtb.github.io
Make the distinction between the displayed classical regression and the coded mixed-effects variant explicit.
Corrected text
Investigate funnel-plot asymmetry across studies. The supplied code uses the mixed-effects meta-regression variant (model="rma", predictor="sei"); the classical multiplicative-dispersion Egger regression is selected with model="lm".
Python and R
yi are study effect estimates on one common scale and vi their sampling variances. Egger/Begg assess small-study asymmetry, not proof of publication bias; power is limited with few studies.
Not run — Executed end to end through Rscript · needs Python standard library + Rscript; R packages: metafor
# Python launcher for the complete R implementation below.
# Requires Rscript on PATH and the listed R packages.
import shutil
import subprocess
rscript = shutil.which("Rscript")
if rscript is None:
raise RuntimeError("Install R and make Rscript available on PATH.")
r_code = r"""
set.seed(2026)
d<-data.frame(yi=rnorm(12,.2,.2),vi=runif(12,.02,.08),moderator=seq_len(12));fit<-metafor::rma(yi,vi,data=d,method="REML")
print(metafor::regtest(fit,model="rma",predictor="sei"))
"""
# No shell interpolation. A failed R execution raises an error in Python.
result = subprocess.run([rscript, "--vanilla", "-"], input=r_code,
text=True, capture_output=True)
print(result.stdout)
if result.stderr:
print(result.stderr)
result.check_returncode()
Validated — Executed successfully in the validation environment · needs metafor
set.seed(2026)
d<-data.frame(yi=rnorm(12,.2,.2),vi=runif(12,.02,.08),moderator=seq_len(12));fit<-metafor::rma(yi,vi,data=d,method="REML")
print(metafor::regtest(fit,model="rma",predictor="sei"))
Output
Regression Test for Funnel Plot Asymmetry Model: mixed-effects meta-regression model Predictor: standard error Test for Funnel Plot Asymmetry: z = -0.0367, p = 0.9707 Limit Estimate (as sei -> 0): b = 0.0953 (CI: -0.4356, 0.6262)
Sources
- metafor regression asymmetry testswviechtb.github.io
- regtestwviechtb.github.io
- regtestsearch.r-project.org
- rmasearch.r-project.org
- Statistics guide v4 (historical):
- Python: Executed end to end through Rscript · R: Executed successfully in the validation environment
- Reference's record:
- Edition 2 review: Python: skip · R: not executed (Rscript unavailable); why not run: Python: Python-to-R bridge; Rscript is unavailable. R code was not executed. Python: Not run in the reference's review: Python-to-R bridge; Rscript is unavailable. R code was not executed. R: Reviewed but not run: R wasn't available to the reference's authors.
From the CodeSplash statistics guide (v4), entry 281, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT281.