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
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
