Systematic review / Meta-analysis

How to Do a Meta-Analysis

Many people first doing a meta-analysis get stuck after the literature search: how to enter the data, which effect measure to use, and how to read the output. This page works through these steps in order using a public dataset of BCG vaccine trials, and explains why each step is done.

Short answer

A meta-analysis pools the results of several studies into one overall estimate, weighting each study. For a first analysis, extract each study’s counts, calculate an effect size and pool it with a random-effects model, then draw a forest plot. The pooled result must also be checked for differences between studies and for stability before it is relied on.

About this page

Tutorial
What this page solves
You want to pool the results of several studies, but you do not know where to search, how to calculate the effect size, or how to read a forest plot.
Who it is for
People doing their first systematic review or meta-analysis, such as graduate students and researchers. You understand basic study designs but have not completed a pooled analysis before.
What you will have
After reading, you will have a runnable R script, a forest plot with a prediction interval, results of heterogeneity and publication-bias tests, and the basis for judging whether these results can be trusted.
Covers
  • Working through one meta-analysis with an example dataset, from searching and screening to pooling the effect sizes
  • Completing pooling, heterogeneity statistics, a forest plot and funnel-plot tests with R’s meta package
  • Converting summary data when a paper gives only medians or HRs, and choosing a risk-of-bias tool and an effect measure by study type
  • Common errors and reasons why results do not match (see the troubleshooting section)
Does not cover
  • How to write the introduction and discussion of a paper
  • The bivariate model for diagnostic accuracy meta-analysis
  • Network meta-analysis
  • Step-by-step interface operations in Stata and RevMan (only default settings are compared)

Main steps

Step 2

Why this stepScreening keeps the studies that meet the eligibility criteria. Extraction copies each study’s data into one standard table. After removing duplicates, two reviewers screen titles and abstracts and then full texts independently, and a third reviewer resolves disagreements.

If the same trial appears in several records, or an extracted value does not match the paper, see the troubleshooting section.

  1. 01

    Import and de-duplicate

    Import the search results into EndNote or Zotero, or into Rayyan or Covidence, and remove duplicates. Conference abstracts, the main report and follow-up reports of the same trial should be merged into one study.

  2. 02

    Screen

    Screen titles and abstracts first, then full texts. Two reviewers work independently, and record the reason and number of each exclusion at each step.

  3. 03

    Design and pilot the extraction form

    Design the form from the protocol, pilot it on 2–3 papers, and then finalise it. Two reviewers extract data independently.

  4. 04

    Enter the dichotomous data

    For each study, record the number of events and the total number of participants in each arm. In dat.bcg, tpos and tneg are the positive and negative counts in the vaccinated group, and cpos and cneg are those in the control group.

Step 3

Why this stepRisk of bias means that the design or conduct of a study could push its results systematically away from the true effect. RoB 2 is the Cochrane tool recommended for randomised controlled trials.

The example dat.bcg does not include risk-of-bias judgements, and the code later on this page does not include this step. In a real project, two reviewers should complete this step independently.

For tools for other study designs, see Choices: how to choose a risk-of-bias tool. If a risk-of-bias judgement does not match its outcome, see the troubleshooting section.

  1. 01

    Choose the tool

    Use RoB 2 for randomised controlled trials.

  2. 02

    Judge each domain

    RoB 2 judges five domains one by one: the randomisation process, deviations from intended interventions, missing outcome data, measurement of the outcome, and selection of the reported result.

  3. 03

    Give an overall judgement for each outcome

    Judge each outcome separately. The overall judgement is low risk, some concerns or high risk.

Step 4

Why this stepAn effect measure converts each study’s result into a number that can be compared. The outcome in this example is dichotomous (event or no event), so the relative risk (RR) is used as the effect measure. Pooling uses a random-effects model, which assumes that the true effects differ between studies.

meta_bcg.R (excerpt): load datar
library(meta); library(metafor)
data(dat.bcg, package = "metadat")
bcg <- dat.bcg; bcg$study <- paste(bcg$author, bcg$year)
meta_bcg.R (excerpt): poolingr
# 1. Pooling: REML for tau2; Wald and Hartung-Knapp CIs plus prediction interval
m <- metabin(tpos, tpos + tneg, cpos, cpos + cneg, data = bcg, studlab = study,
             sm = "RR", method = "Inverse", method.tau = "REML",
             method.random.ci = "HK", prediction = TRUE)
summary(m)
update(m, method.random.ci = "classic")   # Wald-type CI for comparison
  1. 01

    Confirm the effect measure

    For dichotomous outcomes, RR is the default. Other effect measures are covered in Choices: how to choose an effect measure.

  2. 02

    Set the pooling parameters

    Estimate tau² with REML, compute the interval with the Hartung-Knapp (HK) method, and report the prediction interval as well. This example has more than 2 studies and tau² greater than 0, so the conditions for HK are met; see Choices: how to choose the pooling model.

  3. 03

    Run the pooling

    The Wald-type interval is the usual interval calculation. It is output here as a comparison.

Step 5

Why this stepHeterogeneity means that study results disagree with one another. tau² is the variance of the true effects across studies, and I² is the share of the observed variation that comes from differences between studies. The prediction interval gives the range in which the true effect of a similar new study could fall.

I² is a relative measure. It changes with study precision and cannot decide the conclusion alone. The meaning of each statistic and how to judge it are in Explanation: how to read the heterogeneity statistics. If I² is high, or the prediction interval crosses the line of no effect, see the troubleshooting section.

  1. 01

    Find tau²

    Find tau² in the summary output, and calculate its square root, tau. tau is on the same scale as the effect measure.

  2. 02

    Find I²

    Find I² and its confidence interval.

  3. 03

    Find the prediction interval

    Find the prediction interval and compare it with the pooled interval.

Step 6

Why this stepA forest plot shows each study’s effect and confidence interval as one row, with the pooled result as a diamond at the bottom. Readers use it to check the direction and size of each study and where the pooled result lies.

meta_bcg.R (excerpt): forest plotr
# 3. Forest plot (meta 8.5 and later: the file argument is named filename)
forest(m, sortvar = TE, prediction = TRUE, print.tau2 = TRUE,
       filename = "forest_bcg.png")
  1. 01

    Create the figure

    Run forest() and save the figure as a PNG file.

  2. 02

    Set the display options

    sortvar = TE orders studies by effect size, prediction = TRUE shows the prediction interval, and print.tau2 = TRUE prints tau² on the plot.

Step 7

Why this stepPublication bias means that studies with significant results are more likely to be published, so the results lean in one direction. A funnel plot places each effect against its standard error. An asymmetric plot may indicate small-study effects. Skip this step if there are fewer than 10 studies.

meta_bcg.R (excerpt): funnel plot and testsr
# 4. Funnel plot and small-study tests (only with k >= 10; use Harbord or Peters for OR)
funnel(m, type = "contour", common = FALSE)
metabias(m, method.bias = "Egger")
metabias(m, method.bias = "Peters")
  1. 01

    Draw the funnel plot

    Run funnel() to draw a contour-enhanced funnel plot.

  2. 02

    Run the tests

    Run the Egger and Peters tests with metabias().

Choose by your situation

Hand to an agent

Writing the search strings, converting data, running the pooled analysis and drawing figures can be handed to Scientify’s scientific agent. Study selection and risk-of-bias judgements still need you and your collaborators.

Example instruction: “Following the attached PROSPERO protocol, run the meta-analysis on the extraction sheet of 12 RCTs: RR for the primary outcome, random effects + REML + Hartung-Knapp, with a prediction interval; convert medians and quartiles with Luo/Wan after a skewness test; run the planned subgroups, leave-one-out and a sensitivity analysis without high risk of bias studies; output forest plots, funnel plots and a draft methods section.”

The agent installs R meta, metafor and other packages on an isolated cloud computer, and reads the extraction sheet. It checks for SE/SD confusion, inconsistent units and double-counted multi-arm trials. It then completes conversion, pooling and all sensitivity analyses, and outputs figures and a methods section mapped to PRISMA 2020 items. The agent reviews its results adversarially, for example checking whether REML and DL, HK and Wald agree, and whether the trim-and-fill iteration model is stated. The project keeps scripts, parameters, logs and data for reproduction. The task keeps running after you close your computer.

You still need to check: inclusion and exclusion decisions, risk of bias judgements, whether the direction and extracted values of effects match the papers, and the reasons for GRADE ratings.

Choices

Study typeRecommended toolHow it is judgedWhat to know
Randomised controlled trialRoB 2 (2019)Five domains: randomisation process, deviations from intended interventions, missing outcome data, outcome measurement, selection of the reported result; overall judgement is low risk, some concerns or high riskBefore the analysis, decide whether the focus is the assignment effect (ITT) or the adherence effect
Non-randomised intervention study (cohort, case-control comparing two treatments)ROBINS-I (2016); V2 published in 2025Uses a “target trial” as the reference and assesses seven domains including confounding, selection and classification of interventions. V2 gives a suggested judgement by algorithm based on signalling questions and includes immortal time biasROBINS-I takes longer than NOS, but it can tell whether confounding was handled adequately
Exposure study (for example smoking and disease)ROBINS-E (2024)Similar structure to ROBINS-I, focused on exposureThe tool is new, and there are few Chinese examples
Observational study (a common choice in Chinese meta-analyses)Newcastle-Ottawa Scale (NOS)Three parts: selection, comparability and outcome; up to 9 starsThe basis for the NOS scoring is in the troubleshooting section
Diagnostic accuracy studyQUADAS-2Risk of bias and applicability in four domainsPooling for diagnostic meta-analysis (bivariate model) differs from the intervention meta-analysis on this page

Choices

Data typePossible effect measuresHow to chooseBasis
DichotomousRR, OR, RDBy default use RR or OR. Relative effects are more consistent than absolute effects across different baseline risks. Do not pool RD unless there is a reason to believe it is consistent. Absolute effects in the summary of findings table are obtained by multiplying the baseline risk by the RRHandbook 10.4.3
Continuous, same unitMD (mean difference)Use MD when the scale and unit are the same; results can be read directly in clinical units. Change scores and endpoint scores can be pooled togetherHandbook 10.5.2
Continuous, different scalesSMD (Hedges g)Use SMD only when the same construct is measured on different scales. The default SMD in RevMan, meta and Stata is Hedges g (with small-sample correction)Handbook 6.5.1.2, 10.5.2
Survival dataHRPool log HR and its SE (generic inverse variance). The priority of data sources is in the next sectionHandbook 6.8.2; Tierney 2007
Counts and ratesRate ratioIn a rate ratio the time unit cancels out, so whether units are harmonised does not change the resultHandbook 6.7.1

Choices

First ask the corresponding author for the raw data. If that is not possible, convert using the table below, and remove each converted study once in a sensitivity analysis to see whether the conclusion changes.

The authors of the Wan, Luo and Shi methods (including Tiejun Tong of Hong Kong Baptist University) provide an online calculator and an Excel sheet. They run a skewness test before conversion. The R meta package (median, q1, q3, min and max arguments of metacont) and metafor (conv.fivenum) include the same formulas.

Handbook 10.5.3 gives a skewness rule for indicators that can only take positive values: a mean/SD ratio below 2 suggests skewness, and below 1 indicates clear skewness. The mean and SD from such studies should be used cautiously in MD pooling.

When units differ, harmonise them before pooling. For example, divide blood glucose in mg/dL by 18 to get mmol/L, and divide total cholesterol in mg/dL by 38.67 to get mmol/L.

Entering medians and quartiles directly in metar
# With only medians and quartiles, enter them directly in metacont; meta converts internally
# Defaults: mean by Luo 2018; SD by Shi 2020 (when the range is available) or Wan 2014 (IQR only)
d <- data.frame(study = c("A", "B", "C"),
                n.e = c(40, 60, 35), med.e = c(12, 15, 11), q1.e = c(8, 10, 7), q3.e = c(20, 24, 18),
                n.c = c(42, 58, 33), med.c = c(16, 19, 14), q1.c = c(11, 13, 9), q3.c = c(25, 30, 22))
mq <- metacont(n.e, median.e = med.e, q1.e = q1.e, q3.e = q3.e,
               n.c = n.c, median.c = med.c, q1.c = q1.c, q3.c = q3.c,
               data = d, studlab = study, sm = "MD")
cbind(mq$mean.e, mq$sd.e)          # study A: 13.42, 9.21
# For skewed data, switch to the McGrath 2020 Box-Cox method (requires estmeansd)
update(mq, method.mean = "BC-McGrath", method.sd = "BC-McGrath")
# Equivalent metafor function
conv.fivenum(q1 = q1.e, med = med.e, q3 = q3.e, n = n.e, data = d)
What the paper reportsMethodAssumptions and limits
Median + quartiles (Q1, Q3)Mean: Luo 2018; SD: Wan 2014 (the IQR is divided by a factor that depends on sample size, close to 1.35 when n is large)These methods assume the data are roughly normal. Skewed data lead to underestimated means and SDs. Use the skewness test of Shi 2023 to judge; if skewness is clear, switch to the Box-Cox or quantile-based estimation of McGrath 2020
Median + minimum and maximumMean: Luo 2018; SD: Wan 2014Handbook 6.5.2.6 does not recommend estimating the SD from the range (see the troubleshooting section)
Median + quartiles + range (five-number summary)Mean: Luo 2018; SD: Shi 2020Uses the most information and gives the smallest error
Mean + 95% CISD = √n × (upper − lower) / (2 × t₀.₉₇₅,ₙ₋₁); t can be taken as 1.96 when n ≥ 60Valid only when the CI was calculated from the t distribution
Two group means + between-group P or t valueBack-calculate the between-group SE from the t value, then the pooled SD of the two groupsFor the case where only P < 0.05 is given, see the troubleshooting section
Only the n, mean and SD of subgroupsCombine into one whole-group estimate with the formula in Handbook table 6.5.aFor how to handle subgroup data, see the troubleshooting section
Cox regression gives HR and 95% CIUse ln(HR) and SE = (ln upper − ln lower) / 3.92 directlyPreferred
Only log-rank P value and number of eventsTierney 2007: variance of ln(HR) ≈ 4 / total events (for 1:1 allocation)Needs the direction of the effect and the allocation ratio
Only a Kaplan-Meier curveDigitise points with WebPlotDigitizer or Engauge Digitizer, then rebuild individual data with the Tierney table (Parmar method) or the Guyot 2012 algorithm before Cox regression. The R package IPDfromKM implements the rebuilding after digitisationThe HR can be estimated accurately only when the number-at-risk table or the total number of events is reported (see the troubleshooting section)

Choices

The model choice follows settings written in the protocol in advance. Handbook section 10.10.4 states clearly that the choice between fixed and random effects must not be based on the result of a heterogeneity test.

DecisionRecommendationBasis and conditions
Fixed or randomReport the random-effects model by default; state this in the protocol and use the fixed-effect model as a sensitivity analysisHandbook 10.10.4.1 gives no single recommendation, but it opposes choosing by heterogeneity tests. The two models weight studies differently: random effects give more weight to small studies, so the two results diverge when small-study effects are present
tau² estimatorREMLSince the 2024 update, Handbook uses REML as the default (10.10.4.4); RevMan has used REML by default since January 2025. Langan 2019 compared nine estimators and recommended REML; Veroniki 2016 found that Paule-Mandel performs well for both dichotomous and continuous data. DL underestimates tau² when there are many small studies and rare events
Confidence intervalUse Hartung-Knapp (HKSJ, t distribution, k−1 degrees of freedom) when tau² > 0 and there are more than 2 studiesIn IntHout 2014 simulations, the type I error rate of DL can exceed 30%, and HKSJ is at most about twice the nominal value. Among 689 Cochrane meta-analyses, 25.1% of results significant under DL were no longer significant under HKSJ
Only 2 studiesDo not use HK; use a Wald-type interval and run sensitivity analyses with different methodsWith k = 2 the t distribution used by HK has 1 degree of freedom, so the interval is very wide (see the troubleshooting section)
tau² = 0 or Q < k−1Use a Wald-type interval, or the modified HK (mKH)In this situation the HK interval can be narrower than the Wald interval (see the troubleshooting section). Röver 2015 recommends the modified version when studies are few and their precision varies widely
Prediction intervalReport it when there are at least 5 studies and the funnel plot shows no clear asymmetryHandbook 10.10.4.3. The prediction interval answers the question “where might the true effect of a similar new study fall?”
CI for tau²Q-profile methodUseful only with at least 5 studies
With fewer than 5 studies and widely differing study sizes, interpret HKSJ results cautiously even when it is used (IntHout 2014).

Choices

Subgroup variables must be specified in the protocol in advance. Judge whether subgroups differ with a test of differences between subgroups, not by comparing each subgroup’s P value. When a subgroup has too few studies, the random-effects estimate within it can hardly be estimated.

Meta-regression: it is generally not run with fewer than 10 studies, and each covariate needs at least about 10 studies (Handbook 10.11). A study-level covariate (such as mean age) may not reflect the relationship at the individual level, which is ecological bias. The P value from meta-regression should preferably be adjusted with Knapp-Hartung (test = “knha” in metafor; se(khartung) in Stata).

If subgroup conclusions conflict, or a subgroup has too few studies, see the troubleshooting section.

Choices

Sensitivity analyses check whether the conclusion depends on one analysis choice. They should be stated in the protocol in advance.

  • Change the model: fixed and random effects; estimate tau² with REML, DL and PM each.
  • Remove high risk-of-bias studies (RoB 2 high risk, or ROBINS-I serious/critical).
  • Remove converted studies (mean estimated from the median; HR rebuilt from a curve).
  • For studies with zero events, use another handling method (see the troubleshooting section).
  • Leave-one-out: remove studies one at a time, and report the range of the pooled effect and whether any single study changes the conclusion.
  • Calculate the main outcome twice, once with the adjusted effect and once with the unadjusted effect.

Concepts and judgment

Explanation

These statistics answer different questions, so read them separately.

StatisticWhat it answersBasis for judgement
Q testWhether the observed differences exceed sampling errorThe power of the test depends on the number of studies and sample sizes. With few studies the power is low; with many studies or large samples, very small differences become significant
I²What share of the total observed variation comes from real differences between studiesI² is a relative measure and depends on study precision: with tau² unchanged, I² rises towards 100% as study sample sizes increase (Rücker 2008). Handbook’s bands (0–40%, 30–60%, 50–90%, 75–100%) overlap and are only a rough guide
tau², tauThe variance and standard deviation of true effects across studies, on the same scale as the effect measureWith few studies, tau² is very unstable, so report the Q-profile CI
Prediction intervalThe range of the distribution of true effectsWhen the pooled effect is significant but the prediction interval crosses the line of no effect, the effect may not exist in some settings. This should be discussed

Explanation

MethodConditions of useLimits
Funnel plotAt least 10 studies; not used when study sizes are similarAsymmetry indicates a small-study effect. The cause may be publication bias, but also poor quality of small studies, true heterogeneity, an artificial correlation between effect and SE, or chance (Handbook table 13.3.b). A contour-enhanced funnel plot can show whether the missing region lies in the non-significant area
Egger regression testContinuous outcomes with MD; at least 10 studiesFor OR and SMD, the effect is correlated with its SE, so the plain Egger test gives false positives; power is low with few studies
Harbord / Peters testDichotomous ORPeters uses 1/total sample size as the predictor, avoiding the artificial correlation with SE
Trim-and-fillSensitivity analysis onlyAssumes that all asymmetry comes from publication bias. With large heterogeneity, it may impute studies in error and underestimate the effect even without publication bias (Peters 2007). Default settings differ between software; see the measured data in the reference section

Explanation

GRADE rates the certainty of evidence as high, moderate, low or very low. It starts from a baseline and is upgraded or downgraded factor by factor, as in the table below.

For inconsistency, judge the scatter of the point estimates, the overlap of the confidence intervals, and which side of the decision threshold each study falls on. Do not downgrade on I² alone (Core GRADE 2025).

The final certainty of evidence is high, moderate, low or very low. GRADEpro GDT can be used to produce the summary of findings table.

GRADE factorDirectionHow to judge
Starting point—RCTs start at high; observational studies start at low (when ROBINS-I is used, studies can also start at high and then be downgraded for bias)
Risk of biasDowngradeWhether the studies with large weight are at high risk
InconsistencyDowngradeScattered point estimates and non-overlapping CIs that cannot be explained by prespecified subgroups
IndirectnessDowngradeThe population, intervention, comparator or outcome does not match the question
ImprecisionDowngradeThe 95% CI crosses the minimal important difference (MID) or the line of no effect (Core GRADE 2)
Publication biasDowngradeFunnel plot asymmetry, or only small studies funded by industry
Large effect, dose-response, confounding that would reduce the effectUpgradeMainly used for observational studies

Reference and appendix

Reference

The output of each step must be recorded in the 27 items of PRISMA 2020. The basis column refers to the Cochrane Handbook, the PRISMA 2020 explanation and elaboration document, and PROSPERO guidance.

StepWhat to doCriteriaBasis
1 Register the protocolEnter the PICO, sources, eligibility criteria, primary outcome, pooling method, and subgroup and sensitivity analysis plans in PROSPEROPROSPERO requires submission before data extraction starts. A new system launched in March 2025; once all authors confirm the submission, it is published automatically, and similar topics are flagged at submissionPROSPERO guidance; Handbook 10.11.5
2 SearchPubMed/MEDLINE, Embase, Cochrane CENTRAL, plus Chinese databases (CNKI, Wanfang, VIP, SinoMed) and trial registries (ClinicalTrials.gov, ChiCTR)PRISMA 2020 item 7 requires the full search strategy for every database, including limits. Search dates are reported to the dayPRISMA 2020 item 7
3 De-duplicateImport into EndNote, Zotero, or Rayyan or Covidence, and remove duplicatesConference abstracts, the main report and follow-up reports of one trial are merged into one “study” and counted as one studyHandbook Chapter 5
4 ScreenTitle and abstract screening, then full-text screening; two reviewers work independently, with disagreements discussed or resolved by a third reviewerPRISMA 2020 item 8 requires reporting how many people screened each record, whether they did so independently, and whether automation tools were used. The flow diagram states the reasons and numbers for full-text exclusionsPRISMA 2020 items 8 and 16a
5 Extract dataDesign the extraction form in advance, pilot it on 2–3 papers before finalising, and extract independently by two reviewersWhen an outcome has both adjusted and unadjusted results, take the one with the priority set in advance in the protocol. For multi-arm trials, first decide which arms are relevantHandbook Chapters 5, 6 and 23
6 Risk of biasRoB 2 for RCTs, ROBINS-I for non-randomised intervention studies (V2 published in 2025), ROBINS-E for exposure studies, QUADAS-2 for diagnostic studiesRoB 2 judgements apply to a specific result for a specific outcome, and are assessed outcome by outcomeSterne 2019 BMJ; Cochrane ROBINS-I V2
7 Pooling and heterogeneityChoose the effect measure; random effects + REML + HK; report tau², I² and the prediction intervalThe fixed or random model is chosen in advance in the protocol, not based on the heterogeneity test resultHandbook 10.10.4
8 Publication bias and sensitivity analysisFunnel plot and tests with at least 10 studies; sensitivity analyses as set out in the protocolTrim-and-fill is used only as a sensitivity analysis, not as the main corrected resultHandbook 13.3; Peters 2007
9 Certainty of evidenceRate each outcome with GRADE and produce a summary of findings (SoF) tablePRISMA 2020 adds items 15 and 22, which require reporting the method and results of the certainty assessmentPRISMA 2020; Core GRADE 2025

Reference

Most mismatches come from different defaults. In the methods section, state the tau² estimator, the CI method, the distribution and df of the prediction interval, and how I² was computed.

Tested on this page (dat.bcg, 13 studies, REML): the default prediction interval in meta is RR 0.136–1.762 (t distribution, k−1); with Stata's K−2 df it is 0.134–1.785; metafor with test = "z" gives 0.155–1.549. For the same data, I² computed from Q in meta is 92.1% (95% CI 88.3%–94.7%), and computed from tau² in metafor is 92.2% (CI 81.9%–97.7%).

SettingRevMan (from January 2025)Stata 16+ metaR meta 8.5R metafor 5.0
Default tau² estimatorREML (old RevMan 5 used DL)REMLREMLREML
Random-effects CIPrompts HKSJ when tau²>0 and k>2Wald; add se(khartung) for HKWald (method.random.ci = "classic"); change to "HK"z test; test = "knha" for HK
Prediction intervalt distribution, k−1predinterval option, t distribution, K−2prediction = TRUE, t distribution, k−1 (from 8.0; k−2 before)predict(): normal distribution with test = "z", t distribution with test = "knha"
I² formulaFrom tau² (new)From tau² in random-effects modelsFrom Q by default; method.I2 = "tau2" to changeFrom tau²
Zero eventsMH, Peto; 0.5 continuity correctionmhaenszel, peto; correction value configurableMH without correction by default; Peto and GLMM availablerma.mh, rma.peto, rma.glmm
Egger test / trim-and-fillNot availablemeta bias, egger; meta trimfillmetabias; trimfillregtest; trimfill
Meta-regressionNot availablemeta regressmetaregrma(mods = ~ …)

Measured results

Conditions: R 4.5.3, meta 8.5-0, metafor 5.0.1, metadat 1.6-0, IPDfromKM 0.1.10, macOS arm64. Data are dat.bcg (13 BCG vaccine trials, RR) and dat.nissen2007 (42 rosiglitazone trials, myocardial infarction) shipped with metadat.

ComparisonResultNote
tau²: DL / REML / PM / ML0.309 / 0.313 / 0.318 / 0.280Pooled RR is about 0.49 in all cases; with 13 studies the estimator has little effect on the point estimate
Wald vs HK (REML)RR 0.489, CI 0.344–0.696 (P=7×10⁻⁵) vs 0.330–0.726 (P=0.002)HK widens the CI and increases P about 27-fold
Weights under fixed and random effectsLargest study TPT Madras: 41.4% fixed, 10.2% randomFixed-effect RR 0.65, random-effects 0.49; the gap comes from stronger effects in small studies
Two studiesWald 0.134–0.527; HK 0.004–19.2Do not use HK with k=2
Four studies, tau²=0, Q=1.04<3Wald 0.188–0.310; HK 0.190–0.307; modified HK 0.160–0.363HK is narrower than Wald; the modified version corrects this
Meta-regression (latitude)ln(RR) falls 0.029 per degree of latitude; R²=75.6%, residual I²=68%With KNHA adjustment P goes from <0.0001 to 0.005
Leave-one-outRR 0.452 (without TPT Madras) to 0.533 (without Hart & Sutherland)No single study changes the conclusion
Zero events (42 trials, 4 double-zero, 26 single-zero)MH OR 1.28 (0.95–1.73); Peto 1.43 (1.03–1.98); IV + 0.5 correction 1.29 (0.94–1.76); GLMM 1.43 (1.03–1.98)Peto and GLMM are significant, MH and IV are not; several trials in these data used 2:1 allocation, so the balance assumption of Peto is not met; report several methods side by side
SMD: Hedges g vs Cohen d−0.536 vs −0.544 (9 studies)Differences arise mainly in small studies with n<30
Median to mean (lognormal, n=200, true mean 23.3, SD 15.8)Wan/Luo: 20.4, 11.5; Box-Cox (McGrath): 22.5, 13.3With skewed data the normal-based methods underestimate the SD by about 27%
HR reconstructed from KM curves (simulated data, true HR 0.568)With risk table: 0.572 (0.417–0.785), events 160/163; without: 0.565 (0.435–0.735), events 231/163Without numbers at risk the events are overestimated by 42% and the CI is too narrow, consistent with Guyot 2012
Publication-bias tests (dat.bcg, k = 13)Egger P = 0.19, Harbord P = 0.32, Peters P = 0.23; none significantThe results of the Step 7 tests in the main path
Trim-and-fill (dat.bcg)Default in meta (ma.common = TRUE) imputed 4 studies, changing RR from 0.49 (0.34–0.70) to 0.71 (0.46–1.10); ma.common = FALSE, or trimfill(rma object) in metafor, imputed 1 study, RR 0.52 (0.37–0.74)The heterogeneity in this dataset mainly comes from latitude (see meta-regression), which is the situation described by Peters 2007

Chinese practice

The items below come from a Chinese methods journal article, CSDN columns and tools provided by method authors, and only parts that agree with the Cochrane Handbook or the original methods papers are included. The many templated 2025–2026 'meta-analysis pitfall guides' on CSDN were not used.

'Deep extraction' of continuous data

Liu Haining and colleagues (Chinese Journal of Evidence-Based Medicine, 2017, vol. 17, no. 1) cover the following situations: estimating from the median with extremes or quartiles, reading values from figures, combining subgroups, back-calculating the SD from a 95% CI of the mean, and back-calculating a pooled SD from a between-group P or t value. They give Stata and Excel commands for t quantiles (invttail, T.INV.2T). They note that using 0.05 when only P<0.05 is reported overestimates the SD. This agrees with Handbook chapter 6.

Extracting HRs with the Tierney spreadsheet

A CSDN column (February 2024) gives the steps after digitising with Engauge Digitizer: enter coordinates and follow-up in Sheet 2a, compare the simulated and original curves in Sheet 2b and re-digitise if they differ, and read the HR and CI in Sheet 4. This agrees with the instructions in the Tierney paper.

Tong Tiejun's online calculator tests skewness first

The online calculator from the authors of Wan 2014, Luo 2018 and Shi 2020 (Zeng Xiantao is also a Shi 2020 author) asks you to click 'Detect the skewness' first, using the Shi 2023 method, and warns against normal-based methods when skew is significant. Many Chinese tutorials quote the formulae and skip this step.

R code

The code runs as is; the example data install with the metadat package (install.packages(c("meta", "metafor"))). For your own binary outcome data you need four columns: events and totals for each group.

meta_bcg.Rr
# R 4.5.3 + meta 8.5-0 + metafor 5.0.1; example data dat.bcg from the metadat package (13 BCG vaccine trials)
library(meta); library(metafor)
data(dat.bcg, package = "metadat")
bcg <- dat.bcg; bcg$study <- paste(bcg$author, bcg$year)

# 1. Pooling: REML for tau2, both Wald and Hartung-Knapp CIs, plus a prediction interval
m <- metabin(tpos, tpos + tneg, cpos, cpos + cneg, data = bcg, studlab = study,
             sm = "RR", method = "Inverse", method.tau = "REML",
             method.random.ci = "HK", prediction = TRUE)
summary(m)
update(m, method.random.ci = "classic")   # Wald-type interval for comparison

# 2. Sensitivity analysis across tau2 estimators
for (mt in c("DL", "REML", "PM")) print(update(m, method.tau = mt, method.random.ci = "HK"))

# 3. Forest plot (from meta 8.5 the file argument is called filename)
forest(m, sortvar = TE, prediction = TRUE, print.tau2 = TRUE,
       filename = "forest_bcg.png")

# 4. Funnel plot and small-study tests (only with k >= 10; use Harbord or Peters for OR outcomes)
funnel(m, type = "contour", common = FALSE)
metabias(m, method.bias = "Egger")
metabias(m, method.bias = "Peters")

# 5. Trim-and-fill: state the model used in the iterations, otherwise meta and metafor disagree
trimfill(m, ma.common = FALSE)          # random-effects iterations, same as metafor
trimfill(m)                              # meta default: ma.common = TRUE (common-effect iterations)

# 6. Subgroups and meta-regression (meta-regression only with >= 10 studies)
update(m, subgroup = alloc)
metareg(m, ~ ablat)

# 7. Leave-one-out
metainf(m, pooled = "random")

# 8. metafor syntax: Hartung-Knapp via test = "knha"; the prediction interval then uses the t distribution
es <- escalc(measure = "RR", ai = tpos, bi = tneg, ci = cpos, di = cneg, data = bcg)
r <- rma(yi, vi, data = es, method = "REML", test = "knha")
predict(r, transf = exp)
regtest(r); trimfill(r); leave1out(r); confint(r)
# If REML fails (Fisher scoring algorithm did not converge):
# rma(yi, vi, data = es, control = list(stepadj = 0.5, maxiter = 1000))

Troubleshooting by error or symptom

Each entry starts from what you see, with the cause and fix listed separately, roughly in order of how often they occur.

The pooled estimate, confidence interval or prediction interval differs between RevMan, Stata and R for the same data

Cause: Most differences come from different defaults: the tau² estimator (RevMan 5 used DL; the others default to REML), whether HK is used, the degrees of freedom of the prediction interval (k−1 or k−2), the I² algorithm, and how zero events are corrected.

Fix: Harmonise these settings before comparing, and state them in the Methods. For an item-by-item comparison, see the reference section: why the same data give different results in RevMan, Stata and R.

Q-test P > 0.10, so the report says “no heterogeneity”

Cause: With few studies the test has low power and often cannot detect real differences. With many studies or large samples, very small differences become significant.

Fix: Do not conclude from the P value of the Q test alone. Describe heterogeneity with tau², I² and the prediction interval together.

The model is chosen by the rule “use random effects if I² > 50%, otherwise fixed effect”

Cause: Handbook 10.10.4.1 explicitly says the choice of model should not be based on a heterogeneity test. This rule is common in Chinese blogs and CSDN posts, and reviewers often point it out.

Fix: Report the random-effects model by default, and state this in the protocol. Use the fixed-effect model as a sensitivity analysis.

A table reports “mean ± SE”, but the SE is used directly as the SD in the pooling

Cause: The SD is underestimated by a factor of √n, so this study receives too much weight and its SMD is inflated.

Fix: SD = SE × √n. When extracting, check the table footnotes to confirm whether the value is an SE or an SD.

After adding a 0.5 correction to single-arm zero-event studies, the pooled effect moves towards no effect

Cause: The inverse-variance method requires a continuity correction for single-arm zero events. A 0.5 correction pulls the result towards no effect.

Fix: If the event rate is below 1% and the two groups are similar, Peto’s method can be used. If the groups are unbalanced or the effect is large, use the MH method without correction or a GLMM (Bradburn 2007).

Studies with zero events in both arms do not appear in the pooled result

Cause: For OR and RR, the MH and Peto methods exclude studies with zero events in both arms by default.

Fix: State in the Methods how many studies were excluded, and report the results alongside those from GLMM or other methods.

Old tutorial parameters (hakn, comb.fixed, byvar, file) do not match the current version

Cause: From meta 6.0, hakn = TRUE was changed to method.random.ci = “HK”. comb.fixed was changed to fixed in 5.0 and to common in 5.5. byvar was changed to subgroup in 5.0; in 8.5 the old parameter still runs but gives a deprecated warning. In 8.5 the file argument of forest() was renamed filename.

Fix: Use the new parameter names as listed in the meta update log. Examples are in the R code in the reference section.

With only 2 studies, the Hartung-Knapp interval is extremely wide, for example 0.004–19.2

Cause: With k = 2 the t distribution used by HK has 1 degree of freedom, so the interval is very wide. In this page’s measured data, the Wald interval for RR was 0.134–0.527 and the HK interval was 0.004–19.2. A two-study subgroup with HK gave a CI of 0.016–20.8.

Fix: With only 2 studies, do not use HK. Use a Wald-type interval and run sensitivity analyses with different methods.

An Egger test on 5–6 studies gives P > 0.05, so the report says “no publication bias”

Cause: With fewer than 10 studies the test has low power, and asymmetry may come from small-study quality or heterogeneity. Handbook Chapter 13 requires at least 10 studies for a funnel-plot test; the Chinese claim that “9 studies are enough” contradicts this.

Fix: With fewer than 10 studies, state that the test was not done and why. If a test was done, write “no evidence of small-study effects was found”, and state the number of studies and the method.

The number of imputed studies and the pooled RR from trim-and-fill differ between software or parameter settings

Cause: The iteration model differs. The default in meta uses fixed-effect iteration (ma.common = TRUE); setting it to FALSE uses random-effects iteration. In this page’s dat.bcg measurements, the first imputed 4 studies and changed the RR from 0.49 (0.34–0.70) to 0.71 (0.46–1.10); the second imputed 1 study and gave an RR of 0.52 (0.37–0.74). Trim-and-fill assumes that all asymmetry comes from publication bias. dat.bcg’s heterogeneity mainly comes from latitude, which is the situation described by Peters 2007: with large heterogeneity, studies may be imputed by mistake and the effect underestimated even without publication bias.

Fix: State the model used for iteration. Use trim-and-fill only as a sensitivity analysis, not as the main corrected result.

trimfill(m, ma.common = FALSE)          # random-effects iteration, matches metafor
trimfill(m)                              # meta default: ma.common = TRUE (fixed-effect iteration)
The report says “I² = 50%, so the effect varies between 40 and 60”

Cause: I² is a relative measure and cannot show the range over which the effect varies (Borenstein 2017). If study sample sizes increase while tau² stays the same, I² rises towards 100% (Rücker 2008). Handbook’s I² bands overlap and are only a rough guide.

Fix: Describe the distribution of effects with tau² and the prediction interval.

One subgroup has P < 0.05 and the other is not significant, so the report says the two groups differ

Cause: A difference between two P values is not a test of a difference between groups. In this page’s dat.bcg measurement, when studies were split into 3 groups by allocation method, the between-group test gave P < 0.0001 under the fixed-effect model and P = 0.39 under the random-effects model, so the two models gave opposite conclusions.

Fix: Use a test of differences between subgroups. Subgroup variables should be specified in the protocol.

The mean and SD converted from the median differ greatly from the original data

Cause: Methods such as Wan 2014 and Luo 2018 assume the data are roughly normal. Skewed data lead to underestimated means and SDs. In a simulation (n = 200, true mean 23.3, SD 15.8), Wan/Luo gave 20.4 and 11.5, so the SD was about 27% too low. Log-transformed and untransformed data also cannot be pooled together.

Fix: First test for skewness with Shi 2023. If skewness is clear, use McGrath 2020’s Box-Cox or quantile-based estimation (in the same simulation, Box-Cox gave 22.5 and 13.3).

The paper only reports P < 0.05; the back-calculated pooled SD is too large and the pooled result is too conservative

Cause: Back-calculating the between-group SE from P = 0.05 overestimates the SD.

Fix: Try to obtain the exact P value or the raw data. If that is not possible, remove the converted study from the sensitivity analysis once.

The same control group is counted twice in a multi-arm trial pooled analysis

Cause: Both comparisons use the same control group, so the control group receives too much weight, and the two results are correlated.

Fix: Handbook 23.3.4 recommends combining the related trial arms into one group. Splitting the control group’s numbers only partly solves the problem.

The main report, a subgroup report and a follow-up report of the same trial are treated as separate studies

Cause: These reports often have different author lists and titles.

Fix: Check the registration number, enrolment dates and sample sizes. Include each trial only once.

Some pooled HRs are adjusted for confounders while others are crude HRs or raw counts

Cause: Pooling these together treats results with different degrees of confounder control as the same effect.

Fix: The protocol should prioritise the most fully adjusted result, and a sensitivity analysis should use only adjusted results.

Studies are removed one at a time until I² is below 50%, and the remaining studies are reported

Cause: This selects studies based on the results, which is outcome-driven selection.

Fix: Explain heterogeneity with prespecified subgroups or meta-regression. Describe what cannot be explained in the Discussion and downgrade in GRADE. Leave-one-out is for finding studies that change the conclusion, not for choosing a set of studies that lowers I².

rma() stops with the error: Fisher scoring algorithm did not converge

Cause: The REML iterations did not converge.

Fix: Adjust the iteration settings, or switch to PM to estimate tau².

rma(yi, vi, data = es, control = list(stepadj = 0.5, maxiter = 1000))
When tau² is 0 or Q is less than k−1, the HK interval is narrower than the Wald interval

Cause: In this situation the HK interval can be narrower than the Wald interval. In this page’s measurement with 4 studies, tau² = 0 and Q = 1.04, the Wald interval was 0.188–0.310, HK was 0.190–0.307 and modified HK (mKH) was 0.160–0.363.

Fix: Use a Wald-type interval, or the modified HK (mKH). Röver 2015 recommends the modified version when studies are few and their precision varies widely.

A plain Egger test on OR or SMD shows significant asymmetry

Cause: For OR and SMD, the effect size is itself correlated with its SE, so the plain Egger test gives false positives.

Fix: For OR outcomes, use the Harbord or Peters test instead. Peters uses 1/total sample size as the predictor, which avoids the artificial correlation with SE.

The significance of the pooled result changes when a different zero-event method is used

Cause: In this page’s dat.nissen2007 data (42 trials, 4 double-zero and 26 single-arm zero), Peto 1.43 (1.03–1.98) and GLMM 1.43 (1.03–1.98) were significant, while MH 1.28 (0.95–1.73) and IV+0.5 correction 1.29 (0.94–1.76) were not. Many trials in this dataset have a 2:1 allocation ratio, so Peto’s balance assumption is not met.

Fix: Report several methods side by side and explain the reason for the choice.

The HR confidence interval rebuilt from a KM curve is too narrow, and the number of events is higher than in the paper

Cause: Without a risk table, the number of events in the rebuilt data is overestimated. In a simulation (true HR 0.568), the rebuilt event count without the risk table was 231 against a reference value of 163, an overestimate of about 42%. The CI was too narrow, consistent with Guyot 2012.

Fix: Obtain the risk table or total number of events before rebuilding (Guyot 2012). If neither is available, remove these studies from the sensitivity analysis once.

An OR is interpreted as if it were an RR

Cause: An OR cannot be read as an RR. When the event rate exceeds 10%, the two differ noticeably.

Fix: Interpret it as an OR, or use RR as the effect measure. Absolute effects in the summary of findings table are computed by multiplying the baseline risk by the RR.

The pooled effect is close to 0, or its direction is opposite to most studies

Cause: If the scales run in opposite directions (higher score is better in some studies and worse in others) and are not harmonised, the pooled effect cancels out.

Fix: Before pooling, multiply one side by −1 so that all studies point the same way.

The MDs of different studies differ by orders of magnitude

Cause: MDs in different units cannot be pooled directly. An SMD cannot replace the unit conversion, because the SMD treats SD differences caused by different units as effect differences.

Fix: Convert units before pooling. For example, divide blood glucose in mg/dL by 18 to get mmol/L, and divide total cholesterol in mg/dL by 38.67 to get mmol/L.

Change scores and endpoint scores are mixed in an SMD calculation

Cause: The two kinds of SD have different meanings, so they should not be mixed in one SMD. MDs, however, can be pooled together.

Fix: Calculate SMDs separately. If the data must be pooled together, use MD, provided the scale and unit are the same.

A survival rate at one time point is used in place of the HR when pooling

Cause: A survival rate describes only one time point. The guidance is to use it in place of the HR only when all studies report that same time point.

Fix: Preferably extract the HR and its CI from the Cox regression, or rebuild it from the KM curve (see Choices: what to do when a paper gives no mean, SD or HR). Use a survival rate at one time point only if all studies report that same time point.

Pooling RDs directly gives clearly larger heterogeneity

Cause: Heterogeneity is often larger after pooling RDs.

Fix: Do not pool RDs unless there is a reason to believe they are consistent. By default use RR or OR.

Two subgroups of the same trial are each entered into the pooled analysis as separate studies

Cause: Subgroups are not independent studies, so they should not be entered separately.

Fix: If only the n, mean and SD of each subgroup are given, combine them into one whole-group estimate using the formula in Handbook table 6.5.a.

The paper reports only the median and the minimum and maximum; the converted SD has large error

Cause: Handbook 6.5.2.6 does not recommend estimating the SD from the range, because the range is strongly affected by extreme values.

Fix: Ask the authors for the data. Remove the converted study from the sensitivity analysis once.

Meta-regression is run and its P value reported with fewer than 10 studies

Cause: Meta-regression is generally not done with fewer than 10 studies, and each covariate needs at least about 10 studies (Handbook 10.11). Study-level covariates can also produce ecological bias.

Fix: With fewer than 10 studies, do not run it; describe the findings instead. When it is run, adjust the P value with Knapp-Hartung (test = “knha” in metafor).

A prediction interval is reported with fewer than 5 studies

Cause: Handbook recommends reporting a prediction interval only when there are at least 5 studies.

Fix: With fewer than 5 studies, report only the pooled interval and explain why.

Large studies do not look heavily weighted on the forest plot

Cause: The random-effects model adds tau² to the variance of each study, so the weight of large studies is reduced. In this page’s measurement, the largest study (TPT Madras) had a weight of 41.4% under the fixed-effect model and 10.2% under the random-effects model. The claim “larger sample, larger weight” holds only approximately under the fixed-effect model; some Zhihu articles repeat it.

Fix: Before reading the plot, check which model each weight column belongs to.

Studies with an NOS total score of 7 or more are removed

Cause: Stang 2010 points out that NOS items and scoring lack a basis, and agreement between raters is low.

Fix: Report the judgement for each item, not just the total score.

The 2011 seven-item Cochrane risk-of-bias tool is still used, and the reviewer asks for RoB 2

Cause: The old tool is still common in Chinese literature. RoB 2 was published in 2019.

Fix: For randomised trials, switch to RoB 2, and before the analysis decide whether the focus is the assignment effect (ITT) or the adherence effect.

Only one database is reported in the search section, and the reviewer asks for more

Cause: PRISMA 2009 required only one database to be reported. PRISMA 2020 item 7 requires the full search strategy for every database, including limits.

Fix: List the full search strategy for each database, and state the search date to the day.

A subgroup analysis in the paper cannot be found in the PROSPERO protocol

Cause: A subgroup analysis that is not in the protocol is a post hoc analysis.

Fix: Label it as post hoc in the paper and explain why.

Only one overall risk-of-bias rating is given for the whole paper

Cause: RoB 2 judgements apply to a specific result for a specific outcome, not to the whole paper.

Fix: Judge each outcome separately, and use these judgements separately in GRADE.

Sources

FAQ

Can I still pool when I² is high?

Whether to pool depends on whether studies are similar enough in population, intervention and outcome, not on I². If pooling is clinically sensible, use a random-effects model, report tau² and the prediction interval, explain heterogeneity with prespecified subgroups or meta-regression, and rate down for inconsistency in GRADE if it remains unexplained. When effects point in opposite directions and differ greatly, use a narrative synthesis only.

I have only three studies. What method should I use?

Use random effects with REML and give both Wald-type and Hartung-Knapp CIs as a sensitivity analysis; tau² is very unstable, so do not run funnel plots, Egger tests or meta-regression, and do not report a prediction interval (the Handbook suggests ≥5 studies). With only two studies, do not use HK.

Does an Egger test with P>0.05 show there is no publication bias?

No. With fewer than 10 studies the test has low power, and asymmetry may come from small-study quality or heterogeneity anyway. Write 'no evidence of small-study effects was found' and state the number of studies and the method (Harbord or Peters for OR outcomes).

Why do RevMan, Stata and R give different results?

Common reasons are the tau² estimator (old RevMan 5 uses DL, the others default to REML), whether HK is used, the prediction interval df (k−1 or k−2), the I² formula and the zero-event correction. Once these settings are aligned, results agree to two or three decimal places.

A paper gives only survival curves and no HR. What can I do?

Digitise with WebPlotDigitizer or Engauge Digitizer, then reconstruct individual data with the Tierney 2007 spreadsheet or IPDfromKM and compute the HR. Always enter the numbers-at-risk table below the curve and the total events; without both, the HR CI is too narrow. Remove all reconstructed studies once in a sensitivity analysis.

What if I registered in PROSPERO too late?

PROSPERO only accepts protocols submitted before data extraction starts. If extraction has begun, make the protocol public on a platform such as OSF and report the registration date and protocol changes honestly in the paper (PRISMA 2020 item 24).

Hand the computational part of your meta-analysis to Scientify

The scientific agent runs data conversion, pooling, sensitivity analyses and plotting on an isolated cloud computer, keeps all scripts, parameters and logs, and reviews the results adversarially. New users get US$5 of free credit.