Skip to content

BCompare groups · Guide test 282

Begg–Mazumdar rank asymmetry test

Tests rank association between effect estimates and their sampling variances as a funnel asymmetry diagnostic.

Runs in CodeSplashPython (calls R) example not runR example validated

Do it in CodeSplash

In the app, set it up in Analyze with this method:

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 · Begg–Mazumdar rank asymmetry test

14
0.20
0.05
1.50

Adds bias × SE: small studies report bigger effects.

0.050

Your data

Simulated with a known ρ

If H₀ were true

z = 0.82
  1. The reference: how z varies across samples when H₀ is true (normal approximation to Kendall's tau).
  2. Your statistic, from the data above.
  3. The p-value: the area at least as extreme as yours (p = .412).
  4. The hatched rejection region at α = .050: statistics landing here reject H₀.

The formula

τ=Kendall(yi−yˉwvi−1/∑w, vi)\tau = \text{Kendall}\left(\dfrac{y_i-\bar y_w}{\sqrt{v_i-1/\sum w}},\ v_i\right)

With your numbers

z=0.82z = 0.82
viv_i
study variance
τ\tau
rank correlation of standardized effects with variances

The verdict

z = 0.82, p = .412

p > α = .050: compatible with H₀

A rank-based companion to Egger's test: more robust, less powerful.

Statistic
0.821
p-value
0.4115
Begg–Mazumdar rank asymmetry test on 14 (x, y) pairs: z = 0.82, p = .412. The p-value is above α = .050, so the data are compatible with H0.

Begg–Mazumdar rank asymmetry test on 14 (x, y) pairs: z = 0.82, p = .412. The p-value is above α = .050, so the data are compatible with H₀.

Question and hypotheses

H0: no rank association between effect estimates and their precision/variance under the specified procedure.

Assumptions

Independent studies; suitable standardized effect/variance construction and adequate number of studies.

Formula

τ=C−D(k2)(without ties)\begin{gathered}\tau=\frac{C-D}{\binom k2}\\[5pt]\text{(without ties)}\end{gathered}

Parameters and notation

C,D compare ranks of the test’s standardized effect estimates and sampling variances; use tie-adjusted Kendall inference when needed.

Structure of the method

Construct the Begg–Mazumdar standardized effect/variance quantities and assess their rank association with a Kendall-type statistic. The method is an asymmetry diagnostic; it does not estimate a selection model or recover studies absent from the literature.

Estimated and nuisance parameters

Effect estimates and their sampling variances are supplied, and any standardization uses quantities from the common-effect construction. Concordant and discordant pair counts are computed summaries. Ties affect the covariance/reference calculation and must follow the selected implementation rather than the no-ties formula alone.

Settings and design choices

Prespecify study eligibility, effect scale and tie handling. The metafor ranktest interface accepts an intercept-only model, not an arbitrary moderator model. Do not replace the documented adjusted construction by an unexplained correlation of raw effects and sample sizes and give it the same name.

Fitting and adaptation

Adaptation consists of applying the correct study-level transformation and rank inference to a new independent collection. Use influence and alternative-effect-scale analyses to assess robustness. Any exploratory study exclusions or multiple asymmetry diagnostics should be transparently reported rather than chosen for significance.

Sensitivity and robustness

Power is often weak with few studies, and ties or restricted precision range reduce information. Shared participants violate the independent-study interpretation. Rank asymmetry can arise from genuine heterogeneity or selective measurement as well as publication processes; nonrejection does not establish unbiased evidence or validate the pooled effect.

How to use and calibrate

Apply the Begg–Mazumdar adjusted rank correlation procedure and report the chosen effect transformation.

Example application

Screen for small-study asymmetry in a meta-analysis.

Interpretation and pitfalls

Watch out

A correlation of arbitrary raw effects and standard errors is not necessarily the original procedure. Nonrejection does not establish absence of publication bias.

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.

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.

Python · invokes R

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::ranktest(fit))
"""
# 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()
R

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::ranktest(fit))
Output
Rank Correlation Test for Funnel Plot Asymmetry

Kendall's tau = -0.0303, p = 0.9466

Sources

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 282, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT282.