Funnel plot generator and Egger’s test

This funnel plot generator plots each study’s effect against its standard error, with pseudo 95% limits at the pooled estimate ± 1.96 × SE, and tests the plot for asymmetry with Egger’s regression test: each effect divided by its SE, regressed on 1 ÷ SE, where an intercept away from zero means asymmetry. It also runs Begg and Mazumdar’s rank correlation test and trim and fill.

Updated

Runs in your browser. Nothing you enter is uploaded, stored or sent anywhere.

How the funnel plot and the tests work

Each study gives an effect yᵢ, on the log scale for a ratio, and its standard error sᵢ. The plot puts yᵢ across and sᵢ down, with the largest studies at the top, as the Cochrane Handbook recommends (13.3.4.2): it advises plotting against the standard error rather than the sample size, and ratios on a log scale.

What the tool calculates, for k studies.
StepFormula
Pseudo 95% limitsθ ± 1.96 × s, drawn for every s from 0 to the largest
Egger’s testRegress yᵢ ÷ sᵢ on 1 ÷ sᵢ by least squares; test the intercept with t on k − 2 df
Begg and Mazumdar’s testKendall’s τ between (yᵢ − θ) ÷ √(vᵢ − v) and vᵢ, with v = 1 ÷ Σ(1 ÷ vᵢ)
Trim and fill (L0)k₀ = (4Sᵣ − k(k + 1)) ÷ (2k − 1), with Sᵣ the sum of the ranks of the studies on the suspect side, repeated until k₀ settles

θ is the fixed-effect estimate and vᵢ = sᵢ². The funnel can be centred on the random-effects estimate instead, which metafor’s funnel does when given a random-effects model.

  • Egger’s test is the regression of the standard normal deviate on precision that Egger and colleagues proposed in 1997, run as metafor’s classical version (regtest with model = "lm"). It reproduces metafor’s documented result for 15 magnesium trials, t = −3.18 on 13 df, P = 0.0073, and the value OtterSR’s own meta-analysis code is tested against.
  • The rank correlation test is Begg and Mazumdar’s, as metafor’s ranktest runs it: an exact P value, or the normal approximation when there are ties.
  • Trim and fill is Duval and Tweedie’s method with the L0 estimator, as metafor’s trimfill runs it on a fixed-effect model. It picks the side where studies look missing, trims the most extreme studies on the other side until the estimate of how many are missing stops changing, then mirrors them about the trimmed estimate.

Worked example: the BCG vaccine trials

The generator opens on 13 trials of the BCG vaccine against tuberculosis, the dataset metafor uses in its own examples, analysed as risk ratios. Below 1 favours the vaccine.

Cases of tuberculosis in each arm.

  • Aronson 1948

    Vaccinated
    4 of 123
    Not vaccinated
    11 of 139
  • Ferguson & Simes 1949

    Vaccinated
    6 of 306
    Not vaccinated
    29 of 303
  • Rosenthal 1960

    Vaccinated
    3 of 231
    Not vaccinated
    11 of 220
  • Hart & Sutherland 1977

    Vaccinated
    62 of 13,598
    Not vaccinated
    248 of 12,867
  • Frimodt-Moller 1973

    Vaccinated
    33 of 5,069
    Not vaccinated
    47 of 5,808
  • Stein & Aronson 1953

    Vaccinated
    180 of 1,541
    Not vaccinated
    372 of 1,451
  • Vandiviere 1973

    Vaccinated
    8 of 2,545
    Not vaccinated
    10 of 629
  • TPT Madras 1980

    Vaccinated
    505 of 88,391
    Not vaccinated
    499 of 88,391
  • Coetzee & Berjak 1968

    Vaccinated
    29 of 7,499
    Not vaccinated
    45 of 7,277
  • Rosenthal 1961

    Vaccinated
    17 of 1,716
    Not vaccinated
    65 of 1,665
  • Comstock 1974

    Vaccinated
    186 of 50,634
    Not vaccinated
    141 of 27,338
  • Comstock & Webster 1969

    Vaccinated
    5 of 2,498
    Not vaccinated
    3 of 2,341
  • Comstock 1976

    Vaccinated
    27 of 16,913
    Not vaccinated
    29 of 17,854

Example: The results

Fixed effect: RR 0.65 (95% CI 0.60 to 0.70). Random effects: RR 0.49 (0.34 to 0.70), with I² = 92%.

Egger’s test: intercept −2.11 (95% CI −5.43 to 1.21), t = −1.40 on 11 df, P = 0.19. The rank correlation test: Kendall’s τ = 0.03, P = 0.95.

Trim and fill estimates 4 missing studies on the right, the side unfavourable to the vaccine (SE 2.39). With them filled in, the fixed-effect estimate moves to RR 0.75 (0.69 to 0.81).

Neither test finds clear asymmetry, yet trim and fill fills four studies, and the random-effects estimate sits well away from the fixed-effect one. With I² of 92% the trials differ a great deal, and the Handbook lists true heterogeneity as one reason a funnel can look lopsided. These are the numbers metafor prints for the same data: 4 missing studies, SE 2.3853, and a filled estimate of −0.2910 on the log scale.

What the Cochrane Handbook says before you read a funnel plot

  • Use the tests only with at least 10 studies. “As a rule of thumb, tests for funnel plot asymmetry should be used only when there are at least 10 studies included in the meta-analysis, because when there are fewer studies the power of the tests is low” (13.3.4.4). A test that finds nothing can’t rule bias out.
  • Asymmetry isn’t proof of publication bias. The Handbook says asymmetry “should not be considered to be diagnostic for the presence of non-reporting bias” (13.3.4.5). Its Table 13.3.b lists other causes: flawed small studies with inflated effects, true heterogeneity, an artefact of the effect measure, and chance.
  • The original Egger test isn’t recommended for odds ratios and SMDs, because these estimates are correlated with their standard errors. For odds ratios the Handbook points to Harbord’s and Peters’ tests (13.3.4.4), which this tool doesn’t run.
  • Look at the plot as well as the P value, and consider a contour-enhanced plot: if studies seem to be missing where results would be non-significant, non-reporting bias is more plausible; if they seem to be missing where results would be significant, other causes are more likely (13.3.4.3). The tool shades those regions on request.
  • Compare the fixed-effect and random-effects estimates. With heterogeneity and small-study effects, the random-effects estimate shifts towards the smaller studies (13.3.4.6).
  • Trim and fill is a sensitivity analysis. metafor’s documentation says it “should not be regarded as a way of yielding a more ‘valid’ estimate of the pooled effect, but as a way of examining the sensitivity of the results to one particular selection mechanism”.

What to report

What to report: What PRISMA 2020 asks for

In the methods, item 14: “Describe any methods used to assess risk of bias due to missing results in a synthesis (arising from reporting biases)” (PRISMA 2020). Name the plot’s axes, the test and the software.

In the results, item 21: “Present assessments of risk of bias due to missing results (arising from reporting biases) for each synthesis assessed.” Give the funnel plot, the test with its P value, and what you concluded. The result box above writes the sentences for you.

OtterSR’s Write stage draws funnel plots from your extracted data, with pseudo 95% limits and Egger’s test, using the same regression this page uses. It can also shade the significance contours and add trim and fill, with the L0 or R0 estimator. For odds ratios from arm counts, its small-study analysis runs Harbord’s and Peters’ tests, with Begg’s, and Egger’s test on odds ratios is flagged as not recommended. See how OtterSR works.

Frequently asked questions

How do I make a funnel plot online for free?

Choose what each study reports, paste the rows from a spreadsheet or type them in, and the plot draws as you go. Download it as SVG for a journal or PNG for slides. Nothing you enter leaves your browser.

How do I calculate Egger’s test?

Divide each study’s effect by its standard error, regress that on one over the standard error, and test whether the intercept is zero with a t test on k − 2 degrees of freedom. A clearly non-zero intercept means the small studies show different effects from the large ones.

How many studies do I need for a funnel plot?

The Cochrane Handbook’s rule of thumb is at least 10 for the tests, since with fewer they have too little power. The tool still draws the plot and runs the tests with 3 or more, and warns you below 10.

Does an asymmetric funnel plot mean publication bias?

Not on its own. Asymmetry shows small-study effects, and publication bias is only one cause; poorer methods in small trials, real differences between studies, the effect measure and chance are others. Look for which explanation fits your studies before you rate down for publication bias.

How to cite this tool

OtterSR. Funnel plot generator and Egger’s test. https://www.ottersr.com/tools/funnel-plot-generator (accessed today’s date).

Please cite the method as well:

  • Egger M, Davey Smith G, Schneider M, Minder C. Bias in meta-analysis detected by a simple, graphical test. BMJ 1997;315(7109):629–34.

  • Begg CB, Mazumdar M. Operating characteristics of a rank correlation test for publication bias. Biometrics 1994;50(4):1088–101.

  • Duval S, Tweedie R. Trim and fill: a simple funnel-plot-based method of testing and adjusting for publication bias in meta-analysis. Biometrics 2000;56(2):455–63.

Sources

  1. Page MJ, Higgins JP, Sterne JAC. Chapter 13: Assessing risk of bias due to missing evidence in a meta-analysis [last updated August 2024]. In: Higgins JP, Thomas J, Chandler J, et al (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.5. Cochrane, 2024. https://www.cochrane.org/authors/handbooks-and-manuals/handbook/current/chapter-13
  2. Viechtbauer W. metafor: funnel, funnel plots. Reference manual, version 5.3-4. https://wviechtb.github.io/metafor/reference/funnel.html
  3. Egger M, Davey Smith G, Schneider M, Minder C. Bias in meta-analysis detected by a simple, graphical test. BMJ 1997;315(7109):629–34. https://doi.org/10.1136/bmj.315.7109.629
  4. Viechtbauer W. metafor: regtest, regression test for funnel plot asymmetry. Reference manual, version 5.3-4, with its worked examples and output. https://wviechtb.github.io/metafor/reference/regtest.html
  5. Begg CB, Mazumdar M. Operating characteristics of a rank correlation test for publication bias. Biometrics 1994;50(4):1088–101. https://pubmed.ncbi.nlm.nih.gov/7786990/
  6. Viechtbauer W. metafor: ranktest, rank correlation test for funnel plot asymmetry. Reference manual, version 5.3-4, with its worked examples and output. https://wviechtb.github.io/metafor/reference/ranktest.html
  7. Duval S, Tweedie R. Trim and fill: a simple funnel-plot-based method of testing and adjusting for publication bias in meta-analysis. Biometrics 2000;56(2):455–63. https://doi.org/10.1111/j.0006-341x.2000.00455.x
  8. Viechtbauer W. metafor: trimfill, trim and fill analysis. Reference manual, version 5.3-4, with its worked examples and output. https://wviechtb.github.io/metafor/reference/trimfill.html
  9. Viechtbauer W. metadat: dat.bcg, studies on the effectiveness of the BCG vaccine against tuberculosis, from Colditz GA, et al. JAMA 1994;271(9):698–702. https://wviechtb.github.io/metadat/reference/dat.bcg.html
  10. Page MJ, McKenzie JE, Bossuyt PM, et al. The PRISMA 2020 statement: an updated guideline for reporting systematic reviews. BMJ 2021;372:n71. https://doi.org/10.1136/bmj.n71