Functions & Formulae

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

Variance-based I-squared and test-based limits of H and I-squared in a meta-analysis

het(k, W_1, W_2, tau2, Q, z) = (v_typ, I2_v, H, H_low, H_high, I2_low, I2_high)

Maps the number of studies, the sums of their common-effect weights and a between-study variance from any estimator to a typical within-study variance and an I-squared, and maps Cochran's Q and the number of studies to H and to uncertainty limits for H and I-squared. Its inputs come from live records, Cochran's Q from HE-FM-ADMA-002 and the DerSimonian and Laird between-study variance from HE-FM-ADMA-004, and the point I-squared from Q is HE-FM-ADMA-003. The random-effects mean is HE-FM-ADMA-005 and the prediction interval that carries the article's argument for decision makers is HE-FM-ADMA-006, whose t multiplier HE-VR-ADMA-029 uses k-1 degrees of freedom; the k-2 variant in the article changes only that multiplier. Notation follows the Between-Study Heterogeneity article, with v_typ for its typical within-study variance.

  • I-squared from a between-study variance and the typical within-study variance

    v_typ = (k - 1) * W_1 / (W_1^2 - W_2); I2_v = tau2 / (tau2 + v_typ) * 100

    Summarises the precision of the studies in one typical within-study variance v_typ, built from the sums of the common-effect weights, and returns tau2 as a percentage of tau2 plus v_typ. This is the form RevMan implements, where tau2 may come from restricted maximum likelihood or from HE-FM-ADMA-004. With the DerSimonian and Laird estimate it returns the same value as HE-FM-ADMA-003, as the Cochrane Handbook states, so the record adds something when another estimator supplies tau2 or when the question is what study precision does to the statistic. As trials grow v_typ shrinks while tau2 does not, so the percentage climbs towards 100 with no change in the spread of true effects, the weakness the article sets out.

  • Test-based uncertainty limits of H and I-squared from Q and the number of studies

    H = max(1, sqrt(Q / (k - 1))); SE_big = 0.5 * (log(max(Q, k)) - log(k - 1)) / (sqrt(2 * max(Q, k)) - sqrt(2 * k - 3)); SE_small = sqrt((1 - 1 / (3 * (k - 2)^2)) / (2 * (k - 2))); SE_lnH = (Q > k) * SE_big + (Q <= k) * SE_small; H_low = max(1, exp(log(H) - z * SE_lnH)); H_high = max(1, exp(log(H) + z * SE_lnH)); I2_low = (H_low^2 - 1) / H_low^2 * 100; I2_high = (H_high^2 - 1) / H_high^2 * 100

    Takes Cochran's Q from HE-FM-ADMA-002 and the number of studies, and returns H, the square root of Q over its degrees of freedom floored at 1, the standard error of the natural log of H, and limits for H set on the log scale and then transformed into limits for I-squared. The standard error has two cases. SE_big applies when Q exceeds k and SE_small otherwise, and max(Q, k) inside SE_big stops the unused case dividing by zero or taking the log of zero; when SE_big is used, max(Q, k) is Q. The point I-squared is HE-FM-ADMA-003, since (H^2-1) / H^2 with H floored at 1 is that record's formula (derived, 0 mismatches on a grid of 23,142 pairs). The limits put numbers on the uncertainty that HE-AS-ADMA-004 and HE-SR-ADMA-005 describe in words.

This set of formulae is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).

Author: Dr Darrin Baines · Publisher: Intelligent Parameters Ltd · Identifier: https://healtheconomics.wiki/concept/between-study-heterogeneity/formulae