Cochran's Q statistic for an aggregate data meta-analysis

Sums each study's squared deviation from the common-effect estimate, weighted by the inverse of its variance. Under the common-effect model Q follows approximately a chi-squared distribution with k-1 degrees of freedom, so values well above k-1 suggest heterogeneity. Q is the input to I-squared and to the DerSimonian and Laird estimate of tau2.

Signature

Q = sum_(i=1)^k [(y_i - theta_F)^2 / v_i]
Inputs
InputsDefinitionUnit
y_iEffect estimate of study i on the pooling scalethe chosen effect scale
theta_FCommon-effect pooled estimate from the same studies and weightsthe chosen effect scale
v_iVariance of y_i; its inverse is the common-effect weightsquared units of y_i
Output
QWeighted sum of squared deviations of the study estimates from the common-effect estimatenone
  • k Number of studies; Q has k-1 degrees of freedom (count)

Function

Inverse-variance pooling of aggregate study-level effect estimates

Maps the effect estimate and its variance from each of k studies to one pooled estimate, its standard error and measures of between-study heterogeneity. Each study is weighted by the inverse of the variance of its estimate, so more precise studies count for more. Under a common-effect model the weight uses the within-study variance alone; under a random-effects model it also includes the between-study variance tau2. In health technology assessment the pooled relative effect, usually a log hazard ratio or log odds ratio, is then applied to a baseline from another source in a decision model.

Try this function

Implementations

  • Excel

    Cochran's Q from study ranges and the pooled estimate

    With the ranges StudyEst and StudyVar and the common-effect estimate in a cell named PooledFE, the formula returns Q.

    =SUMPRODUCT((StudyEst-PooledFE)^2/StudyVar)

Assumptions

  • Common-effect weights and estimate in Cochran's Q

    The deviations are taken from theta_F and weighted by 1/v_i, the common-effect weights, even when a random-effects model is fitted afterwards. Using random-effects weights changes the statistic and its reference distribution.

Worked examples

  • Cochran's Q for three illustrative trials

    The deviations from the pooled value of -0.1872 are -0.4128, 0.1372 and -0.2128, giving weighted squared terms of 4.2594, 1.8833 and 0.7243 and a Q of about 6.867 on 2 degrees of freedom, as in the article.

    k = 3; y_i = [-0.60,-0.05,-0.40]; v_i = [0.04,0.01,0.0625]; theta_F = -0.18723; Q = 6.867

Common errors

  • Choosing the pooling model from the Q test

    The chi-squared test based on Q has low power when studies are few or small, so a non-significant result is weak evidence that the studies share one effect. Switching between common-effect and random-effects pooling on the test result alone lets an underpowered test decide the treatment effect that enters the model.

Sources

  • Definition of Cochran's Q with common-effect weights

    Veroniki AA, Jackson D, Viechtbauer W, Bender R, Bowden J, Knapp G, Kuss O, Higgins JPT, Langan D, Salanti G. Methods to estimate the between-study variance and its uncertainty in meta-analysis. Research Synthesis Methods. 2016;7(1):55-79. Section on the DerSimonian and Laird estimator, which defines Q as the sum of common-effect weights times squared deviations from the common-effect mean, with weights equal to one over the within-study variance.

    View source →

  • Low power of the heterogeneity test in the Cochrane Handbook

    Deeks JJ, Higgins JPT, Altman DG, McKenzie JE, Veroniki AA (editors). Chapter 10: Analysing data and undertaking meta-analyses. In: Cochrane Handbook for Systematic Reviews of Interventions version 6.5. Cochrane; 2024. Section 10.10.2, which notes that the chi-squared test has low power when studies have small sample size or are few in number.

    View source →

Canonical Identity

Stable URI · Machine-readable · Resolvable · CC BY 4.0