Functions & Formulae

Each applied formula has its own function page, with a signature, implementations, and tests.

Begg and Mazumdar adjusted rank correlation test function for small-study effects

(tau, Z) = f(C, D, K); t_j = g(theta_j, v_j, theta_IV, W)

Maps the effect estimates of K studies in a meta-analysis, on an approximately normal scale such as log hazard ratios, and their within-study variances to the Begg test. Each estimate is standardised against the inverse-variance pooled estimate, and Kendall's rank correlation between the standardised effects and the variances is tested against zero. A significant correlation signals funnel plot asymmetry, a small-study effect, but not its cause: non-reporting of small studies, flawed small trials, genuinely different patients in small trials, artefact and chance can all produce it. The records follow the notation of the Begg Test article. The pooled estimate itself is the common-effect estimate HE-FM-ADMA-001.

  • Kendall's tau and normal test statistic of the Begg test from concordant and discordant study pairs

    S = C - D; tau = S / (K * (K - 1) / 2); Var_S = K * (K - 1) * (2 * K + 5) / 18; Z = S / sqrt(Var_S)

    Compares every pair of studies once. A pair is concordant when the study with the larger variance also has the larger standardised effect (HE-FM-BEGG-002), and discordant when it has the smaller one. Kendall's score S, the difference between the two counts, is divided by the number of pairs to give tau, and by the square root of its null variance without ties to give a statistic compared with the standard normal distribution. When benefit is negative, as with log hazard ratios, exaggerated benefit in the smaller studies gives a negative tau. Stata's Kendall routine, to which its meta bias command refers, uses abs(S) minus 1 in the numerator as a continuity correction, and metafor's ranktest reports an exact p-value where it can, so a report states which version it used.

  • Standardised effect of one study for the Begg test

    t_j = (theta_j - theta_IV) / sqrt(v_j - 1 / W)

    Subtracts the inverse-variance pooled estimate from a study's effect estimate and divides by the standard deviation of that difference. The variance of the difference is the study's own variance less the variance of the pooled estimate, one over the sum of the weights, which allows for the study's own contribution to the pooled value. Without small-study effects the standardised values show no trend with study variance.