Converter tool

Meta-Analysis with Forest and Funnel Plots

Pool studies from means and SDs, 2×2 tables, correlations or ready-made effects: fixed and random-effects results, Q, I-squared and tau-squared, a forest plot, a funnel plot with Egger's test, and leave-one-out.

One row per study

1. Your studies

Or paste the table

Meta-Analysis with Forest and Funnel Plots

Operator: Abdulla Al Fahad. How tools are built and checked

Thirteen trials of the BCG vaccine against tuberculosis mostly point the same way but disagree on size, from a risk ratio of 0.20 in Vandiviere's trial to 1.56 in Comstock and Webster's, the one that found more cases among the vaccinated. Pooled with a fixed-effect model they give 0.65 (0.60 to 0.70). Pooled with a random-effects model, which lets the true effect differ between trials, they give 0.49 (0.34 to 0.70) with I-squared of 92%.

Those two answers differ because a fixed-effect model lets two trials, TPT Madras (trial 8, the Tuberculosis Prevention Trial in Madras, reported in 1980) and Stein and Aronson (trial 6), carry 65% of the weight. The random-effects model gives each of them about 10% and lets the 13 trials' scatter widen the interval.

The page turns one row per study into either pooled answer, a forest plot, a funnel plot with Egger's test, and a leave-one-out table, and exports the pooling as spreadsheet formulas.

Key features

  • Hedges' g, mean difference, odds ratio, risk ratio, risk difference, Fisher z for correlations, or a ready-made effect and standard error
  • Fixed-effect and DerSimonian-Laird random-effects pooling side by side with z tests
  • Cochran's Q with its p-value, I-squared, H-squared and tau-squared, plus a 95% prediction interval for a new study
  • A forest plot with weights, ratio measures on a log axis, as downloadable SVG
  • A funnel plot with pseudo 95% limits and Egger's regression test
  • Leave-one-out pooling under the model you choose
  • A studies CSV and an XLSX in which weights, Q, tau-squared and both pooled results are live formulas

Effect measures, the pooling model and what the heterogeneity numbers mean

Pick the effect measure first, then map the columns. Means and SDs with n for each group give a standardised mean difference (Hedges' g) or a plain mean difference. Events and group totals give an odds ratio, a risk ratio or a risk difference. A correlation and n give a Fisher z. Or give an effect and its standard error on the scale you want pooled. Effects are group 1 against group 2.

If you choose the effect-and-standard-error option, enter the log odds ratio and its standard error yourself, not the ratio, or the pooled value will be wrong.

A study label column is optional but makes the plots readable. Up to 500 studies are read. A row left blank in every mapped column is skipped, and a row with a missing or impossible value stops the run with that study's name.

How it works

Each study becomes an effect y with variance v on the analysis scale: the log for odds and risk ratios, Fisher's z for correlations. Hedges' g is d times the small-sample factor 1 - 3 / (4 df - 1), with the usual variance; a zero in any cell of a 2 by 2 table adds 0.5 to every cell of that table for ratios.

The fixed-effect estimate weights by 1 / v. Q is the weighted squared distance of the studies from that estimate, I-squared is (Q - df) / Q floored at 0, and the DerSimonian-Laird tau-squared is (Q - df) divided by the sum of weights minus the sum of squared weights over the sum of weights, floored at 0. The random-effects estimate re-weights by 1 / (v + tau-squared). Intervals are normal, and the prediction interval uses a t distribution with k - 2 degrees of freedom around the random estimate with variance tau-squared plus its standard error squared.

Egger's test regresses each study's effect divided by its standard error on 1 over its standard error and tests the intercept with k - 2 degrees of freedom. Leave-one-out repeats the whole pooling, including tau-squared, with each study removed in turn.

Ratio measures are pooled on the log scale and shown back as ratios, correlations as Fisher z shown back as r, so the forest plot's axis is logarithmic for ratios and linear otherwise.

Common use cases

  • Combining 13 vaccine trials, each as events and totals in a vaccinated and a control arm, into one risk ratio.
  • Pooling 8 randomised trials of a teaching method from their means, SDs and group sizes into Hedges' g with a forest plot for a dissertation.
  • Combining 20 studies' correlations between sleep and exam score (each r with its n) by Fisher z and reading the pooled r back.

How to use this tool

  1. Drop the table with one row per study.
  2. Choose the effect measure and confirm the columns the page guessed.
  3. Read the pooled results, Q, I-squared and the prediction interval.
  4. Check the forest plot, then the funnel plot and Egger's p-value.
  5. Open the leave-one-out table and download the CSV, SVG or XLSX.

Example

bcg-vaccine-trials.csv, risk ratio (rows 1, 6 and 8 of 13; columns are TB cases and group sizes)

trial,author_year,tb_vaccinated,n_vaccinated,tb_control,n_control
1,Aronson 1948,4,123,11,139
...
6,Stein & Aronson 1953,180,1541,372,1451
...
8,TPT Madras 1980,505,88391,499,88391
...

Pooled result, 13 trials

Fixed effect RR 0.650 (0.601 to 0.704)
Random effects RR 0.490 (0.345 to 0.695), p 0.00006
Prediction interval 0.135 to 1.769
Q 152.23 on 12 df, I-squared 92.1%, tau-squared 0.3088
Egger intercept -2.112 (SE 1.507), p 0.189
Leave-one-out random RR from 0.454 to 0.539

Common pitfalls

Egger's test has little power under about 10 studies, and the output carries that caveat. A non-significant p (0.19 here) does not show the funnel is symmetric, and asymmetry can come from real differences between small and large trials as well as from missing studies.

The DerSimonian-Laird interval is a plain normal interval and ignores the uncertainty in tau-squared. With fewer than about 5 studies it is too narrow; Hartung-Knapp is not offered here.

Pooled risk ratios from trials with very different control-group risks hide that the ratio may depend on the baseline. Look at the forest plot for a pattern before relying on one number.

I-squared is a share of variation, not its size. 92% says the trials disagree beyond chance; tau-squared of 0.31 on the log scale, a standard deviation of 0.56, says how much.

  • Compare the fixed and random weights column by column. When one trial holds more than a third of the fixed weight, as TPT Madras does here with 41%, the fixed estimate is mostly that one trial.

Common errors and how to fix them

Study "Aronson 1948": events must be between 0 and the group size.
An event count exceeds its group total, often because columns are swapped. Check that the events and total columns are mapped to the right fields.
A meta-analysis needs at least 2 studies.
Fewer than two usable rows were read. Check the column mapping and that the rows are not all blank in the mapped columns.
Study "Trial 7": the standard error must be above 0.
An effect-and-SE row has a zero or blank standard error. Supply the standard error on the same scale as the effect.
Study "Trial 4": a mean, SD or n is missing or not a number.
A mean-difference row has an empty or text cell in one of its six mapped columns. Fill it, or delete the study row.

Best practices

  • Report the prediction interval with the random-effects result. Here it runs from 0.14 to 1.77, which says a new trial could well find no benefit even though the pooled interval excludes 1.

Reading the plots

In the forest plot each square is a trial, sized by its weight under the model you choose, with a line for its 95% interval; the diamonds are the pooled fixed and random results, and the vertical line is no effect (1 for ratios, 0 otherwise). Intervals that do not touch the diamond are a visual sign of the heterogeneity Q measures.

In the funnel plot, studies sit by effect and standard error with the most precise at the top, inside pseudo 95% limits centred on the fixed-effect estimate. Missing studies show up as an empty region on one side of the funnel.

Cross-checked with the metafor package

On the BCG data the page reproduces the results published with the metafor R package: Q = 152.2330 on 12 degrees of freedom, a DerSimonian-Laird tau-squared of 0.3088 and a pooled log risk ratio of -0.7141 (SE 0.1787), and a fixed-effect log odds ratio of -0.4361.

Frequently asked questions

Which model should I report, fixed or random?

If the trials differ in population or method, which Q and I-squared of 92% suggest here, the random-effects model describes the average effect across settings, and the fixed-effect model describes only the studies in hand. Report the random-effects result with its prediction interval, and the fixed-effect one for comparison.