Statistical Algorithms
Statistical Algorithms
August 2010
Data structure
Consider a meta-analysis of k studies. When the studies have a dichotomous (binary) outcome the
results of each study can be presented in a 2×2 table (Table 1) giving the numbers of participant
who do or do not experience the event in each of the two groups (here called experimental (or 1)
and control (or 2)).
If the outcome is a continuous measure, the number of participants in each of the two groups, their
mean response and the standard deviation of their responses are required to perform meta-analysis
(Table 2).
Table 2: Continuous data
Group Mean Standard
Study i
size response deviation
Experimental n1i m1i sd1i
Control n2i m2i sd 2i
If the outcome is analysed by comparing observed with expected values (for example using the
Peto method or a log-rank approach for time-to-event data), then ‘O – E’ statistics and their
variances are required to perform the meta-analysis. Group sizes may also be entered by the review
author, but are not involved in the analysis.
For other outcomes a generic approach can be used, the user directly specifying the values of the
intervention effect estimate and its standard error for each study (the standard error may be
calculable from a confidence interval). ‘Ratio’ measures of effect effects (e.g. odds ratio, risk ratio,
hazard ratio, ratio of means) will normally be expressed on a log-scale, ‘difference’ measures of
1
effect (e.g. risk difference, differences in means) will normally be expressed on their natural scale.
Group sizes can optionally be entered by the review author, but are not involved in the analysis.
{
SE ln ( ORPeto ,i ) = } 1
Vi
,
Odds ratio
For methods other than the Peto method, the odds ratio for each study is given by
ad
ORi = i i ,
bi ci
the standard error of the log odds ratio being
SE {ln ( ORi )} =
1 1 1 1
+ + + .
ai bi ci d i
Risk ratio
The risk ratio for each study is given by
ai / n1i
RRi = ,
ci / n2i
2
the standard error of the log risk ratio being
SE {ln ( RRi )} =
1 1 1 1
+ − − .
ai ci n1i n2i
Risk difference
The risk difference for each study is given by
ai ci
RDi = − ,
n1i n2i
with standard error
ai bi ci di
SE { RDi } = + 3 .
n13i n2i
Empty cells
Where zeros cause problems with computation of effects or standard errors, 0.5 is added to all cells
( ai , bi , ci , d i ) for that study, except when ai = ci = 0 or bi = d i = 0 , when the relative effect
measures ORi and RRi are undefined.
si =
( n1i − 1) sd12i + ( n2i − 1) sd 2i2
Ni − 2
be the pooled standard deviation across the two groups.
3
Individual study estimates: O – E and variance
For study i the effect estimate is given by
Z
θˆ i = i ,
Vi
with standard error
{ }1
SE θˆ i =
Vi
.
The effect estimate is either of a log odds ratio or a log hazard ratio, depending on how the
observed and expected values were derived.
Meta-analysis methods
All summations are over i, from 1 to the number of studies, unless otherwise specified.
ORMH =
∑ wMH ,iORi ,
∑ wMH ,i
where each study’s odds ratio is given weight
bi ci
wMH ,i = .
Ni
The summary log odds ratio has standard error given by
1⎛ E F +G H ⎞
SE {ln ( ORMH )} = ⎜ + + 2⎟, (2)
2 ⎝ R2 RS S ⎠
where
ai di bc
R=∑ ; S =∑ i i ;
Ni Ni
4
E=∑
( ai + di ) ai di ; F =∑
( ai + di ) bi ci ;
2
N i N i2
G=∑
( bi + ci ) ai di ; H =∑
( bi + ci ) bi ci .
2
N i N i2
Risk ratio
The Mantel-Haenszel summary log risk ratio is given by
⎛ ∑ wMH ,i RRi ⎞
ln ( RRMH ) = ln ⎜ ⎟⎟ , (3)
⎜ ∑w
⎝ MH ,i ⎠
and the Mantel-Haenszel summary risk ratio by
RRMH =
∑ wMH ,i RRi ,
∑ wMH ,i
where each study’s risk ratio is given weight
ci ( ai + bi )
wMH ,i = .
Ni
The summary log risk ratio has standard error given by
SE {ln ( RRMH )} =
P
, (4)
RS
where
n n ( a + c ) − ai ci N i an cn
P = ∑ 1i 2i i 2i ; R = ∑ i 2i ; S = ∑ i 1i .
Ni Ni Ni
Risk difference
The Mantel-Haenszel summary risk difference is given by
RDMH =
∑ wMH ,i RDi , (5)
∑ wMH ,i
where each study’s risk difference is given weight
n1i n2i
wMH ,i = .
Ni
The summary risk difference has standard error given by
J
SE { RDMH } = , (6)
K2
where
a b n3 + c d n3 n n
J = ∑ i i 2i i 2 i 1i ; K = ∑ 1i 2i .
n1i n2i N i Ni
5
where θ̂ represents the log odds ratio, log risk ratio or risk difference and the wi are the weights
{ }
2
calculated as 1 SE θˆ i rather than the weights used for the Mantel-Haenszel meta-analyses.
Under the null hypothesis that there are no differences in intervention effect among studies this
follows a chi-squared distribution with k − 1 degrees of freedom (where k is the number of studies
contributing to the meta-analysis).
θˆ IV =
∑ w θˆ i i
. (7)
∑w i
with
{ }
SE θˆ IV =
1
. (8)
∑w i
The heterogeneity statistic is given by a similar formula as for the Mantel-Haenszel method:
∑ ( )
2
Q = w θˆ − θˆ
IV i i . IV
Under the null hypothesis that there are no differences in intervention effect among studies this
follows a chi-squared distribution with k − 1 degrees of freedom (where k is the number of studies
contributing to the meta-analysis). I2 is calculated as
⎧ Q − ( k − 1) ⎫
I 2 = max ⎨100% × IV , 0⎬ .
⎩ QIV ⎭
6
ln ( ORPeto ) =
∑V ln ( OR i Peto ,i ). (9)
∑V i
Under the null hypothesis that there are no differences in intervention effect among studies this
follows a chi-squared distribution with k − 1 degrees of freedom (where k is the number of studies
contributing to the meta-analysis). I2 is calculated as
⎧ Q − ( k − 1) ⎫
I 2 = max ⎨100% × Peto , 0⎬ .
⎩ QPeto ⎭
θˆ =
∑Vi θˆ i , (11)
∑Vi
where the estimate, θˆ , from study i is calculated from Z and V as for individual studies. The
i i i
summary effect is either a log odds ratio or a log hazard ratio (the user should specify which). The
effect estimate (on a non-log scale) is given by
⎧⎪ ∑ Vi θˆ i ⎫⎪
effect estimate = exp ⎨ ⎬,
⎩⎪ ∑ Vi ⎭⎪
and is either an odds ratio or a hazard ratio.
The effect estimate (on the log scale) has standard error
SE θˆ = {} 1
. (12)
∑ iV
7
⎧ Q − ( k − 1) ⎫
I 2 = max ⎨100% × Peto , 0⎬ .
⎩ QPeto ⎭
for log odds ratio, log risk ratio, risk difference, mean difference, standardized mean difference, or
for the intervention effect in the generic method, as appropriate.
For continuous data and for the generic method, Q is QIV . For binary data, either QIV or QMH may
be taken. Both are implemented in RevMan 5 (and this is the only difference between random-
effects methods under ‘Mantel-Haenszel’ and ‘inverse-variance’ options). Again, for odds ratios,
risk ratios and other ratio effects, the effect size is taken on the natural logarithmic scale.
θˆ DL =
∑ wi′θˆ i , (13)
∑ wi′
and
{ }
SE θˆ DL =
1
. (14)
∑ wi′
Note that in the case where the heterogeneity statistic Q is less than or equal to its degrees of
freedom (k − 1) , the estimate of the between study variation, τˆ 2 , is zero, and the weights coincide
with those given by the inverse-variance method.
Confidence intervals
The 100(1 − α )% confidence interval for θ̂ is given by
{}
θˆ − SE θˆ Φ (1 − α 2 ) to θˆ + SE θˆ Φ (1 − α 2 ) , {}
where θ̂ is the log odds ratio, log risk ratio, risk difference, mean difference, standardized mean
difference or generic intervention effect estimate, and Φ is the standard normal deviate. For log
odds ratios, log risk ratios and generic intervention effects entered on the log scale (and identified
8
as such by the review author), the point estimate and confidence interval limits are exponentiated
for presentation.
Test statistics
Test for presence of an overall intervention effect
In all cases, the test statistic is given by
θˆ
Z= ,
SE θˆ()
where the odds ratio, risk ratio and other ratio measures are again considered on the log scale.
Under the null hypothesis that there is no overall effect of intervention effect this follows a standard
normal distribution.
{ }
standard error SE θ̂ j . The summary effect size may be based on either a fixed-effect or a
random-effects meta-analysis. For fixed-effect meta-analyses, these numbers correspond to above
equations (1) and (2); (3) and (4); (5) and (6); (7) and (8); (9) and (10); or (11) and (12), each
applied within each subgroup. For random-effects meta-analyses, these numbers correspond to
equations (13) and (14), each applied within each subgroup. Note that for ratio measures, all
computations here are performed on the log scale.
θˆ tot =
∑ w j θˆ j .
∑ wj
The test statistic for differences across subgroups is given by
∑ ( )
2
Q = w θˆ − θˆ
int j .j tot
Under the null hypothesis that there are no differences in intervention effect across subgroups this
follows a chi-squared distribution with S − 1 degrees of freedom (where S is the number of
subgroups with summary effect sizes).
9
Note. An alternative formulation for fixed-effect meta-analyses (inverse variance and Peto methods
only) is as follows. The Q statistic defined by either QIV or QPeto is calculated separately for each of
the S subgroups and for the totality of studies, yielding statistics Q1 , …, QS and Qtot . The test
statistic is given by
S
Qint = Qtot − ∑ Q j .
j =1
This is identical to the test statistic given above, in these specific situations.
10
Bibliography
Borenstein M, Hedges LV, Higgins JPT, Rothstein HR. Introduction to Meta-analysis. John Wiley
& Sons, 2009.
Breslow NE, Day NE. Combination of results from a series of 2x2 tables; control of confounding.
In: Statistical Methods in Cancer Research, Volume 1: The analysis of case-control data. IARC
Scientific Publications No.32. Lyon: International Agency for Health Research on Cancer, 1980.
Deeks JJ, Altman DG, Bradburn MJ. Statistical methods for examining heterogeneity and
combining results from several studies in a meta-analysis. In: Egger M, Davey Smith G, Altman
DG. Systematic Reviewes and Healthcare: meta-analysis in context. BMJ Publications (in press).
DerSimonian R, Laird N. Meta-analysis in clinical trials. Controlled Clinical Trials 1986; 7: 177-
188.
Greenland S, Robins J. Estimation of a common effect parameter from sparse follow-up data.
Biometrics 1985;41: 55-68.
Greenland S, Salvan A. Bias in the one-step method for pooling study results. Statistics in Medicine
1990; 9:247-252.
Hedges LV, Olkin I. Statistical Methods for Meta-analysis. San Diego: Academic Press 1985.
Chapter 5.
Higgins JPT, Thompson SG, Deeks JJ, Altman DG. Measuring inconsistency in meta-analysis.
BMJ 2003; 327: 557-560.
Mantel N, Haenszel W. Statistical aspects of the analysis of data from retrospective studies of
disease. Journal of the National Cancer Institute 1959;22: 719-748.
Robins J, Greenland S, Breslow NE. A general estimator for the variance of the Mantel-Haenszel
odds ratio. American Journal of Epidemiolgy 1986; 124:719-723.
Rosenthal R. Parametric measures of effect size. In: Cooper H, Hedges LV (eds.). The Handbook
of Research Synthesis. New York: Russell Sage Foundation, 1994.
Sinclair JC, Bracken MB. Effective Care of the Newborn infant.Oxford: Oxford University Press
1992.Chapter 2.
Yusuf S, Peto R, Lewis J, Collins R, Sleight P. Beta blockade during and after myocardial
infarction: an overview of the randomized trials. Progress in Cardiovascular Diseases 1985;27:335-
371.
11