Skip to content
FlowScript templates

Evidence synthesis — meta-analysis forest and funnel plots

Random-effects meta-analysis of twelve randomised trials drawn twice from one set of study rows: a forest plot with subgroups, pooled diamonds and the prediction interval, and a funnel plot with Egger's test and trim-and-fill. Typed FlowScript for clinical trials. Keywords: CONSORT, randomised, randomized, trial, RCT, flow diagram, PRISMA, cohort.

Template previewFlowScript
Cardiac rehabilitation versus usual care: admission at 12 monthsFigure: Cardiac rehabilitation versus usual care: admission at 12 months. Forest plot. Horizontal axis: RR (95% CI), logarithmic scale, from 0.170105 to 3.63912. Vertical axis: Study, 12 categories: Okafor 2012, Lindqvist 2013, Moreau 2015, Silva 2017, Abdi 2019, Haddad 2021, Ito 2023, Hartmann 2014, and 4 more. 12 series. Okafor 2012 (0.48, interval 0.266613 to 0.864175, n = 120); Lindqvist 2013 (0.698113, interval 0.489009 to 0.996632, n = 310); Moreau 2015 (0.725, interval 0.548665 to 0.958008, n = 420); Silva 2017 (0.461538, interval 0.200439 to 1.06276, n = 64); Abdi 2019 (1.38095, interval 0.85401 to 2.23303, n = 182); Haddad 2021 (0.652174, interval 0.466275 to 0.912188, n = 540); Ito 2023 (1.125, interval 0.485897 to 2.60472, n = 76); Hartmann 2014 (0.769231, interval 0.374118 to 1.58163, n = 96); and 4 more not listed. Observations: n = 2,406 participants. Uncertainty: 95% confidence intervals. Annotations: line of no effect at 1 at 1 (reference line). Not stated in the figure data: units, effect. Inverse-variance pooling of 12 study-level estimates on the log scale. Fixed effect: Cochrane Handbook §10.3.1. Random effects: DerSimonian–Laird τ² = 0.02053, reported with the Hartung–Knapp–Sidik–Jonkman interval on 11 df. Heterogeneity: Cochran's Q, Higgins & Thompson (2002) I² and H, τ² interval by Q-profile (Viechtbauer 2007). Prediction interval: Higgins, Thompson & Spiegelhalter (2009) on 10 df. Pooled random-effects estimate 0.77 (95% CI 0.64 to 0.93), P = 0.0097. Heterogeneity: τ² = 0.0205 (DL), I² = 27%, Q = 15.10 on 11 df, P = 0.18. Prediction interval 0.532 to 1.109 on 10 degrees of freedom: where a new study is expected to fall, which is not the interval of the average effect. Okafor 2012: 0.48 (0.27 to 0.86), weight 6.0%. Lindqvist 2013: 0.70 (0.49 to 1.00), weight 12.5%. Moreau 2015: 0.73 (0.55 to 0.96), weight 16.4%. Silva 2017: 0.46 (0.20 to 1.06), weight 3.3%. Abdi 2019: 1.38 (0.85 to 2.23), weight 8.3%. Haddad 2021: 0.65 (0.47 to 0.91), weight 13.4%. Ito 2023: 1.13 (0.49 to 2.60), weight 3.3%. Hartmann 2014: 0.77 (0.37 to 1.58), weight 4.3%. Tanaka 2016: 0.93 (0.61 to 1.42), weight 9.8%. Novak 2018: 0.80 (0.52 to 1.22), weight 9.9%. Kowalczyk 2020: 1.38 (0.61 to 3.09), weight 3.5%. Brennan 2022: 0.65 (0.41 to 1.01), weight 9.2%. Subgroup Centre-based, k = 7: 0.74 (95% CI 0.60 to 0.90). Subgroup Home-based, k = 5: 0.83 (95% CI 0.63 to 1.08). Test for subgroup differences: Q = 0.48 on 1 degrees of freedom, P = 0.49.Cardiac rehabilitation versus usual care: admission at 12 monthsno effect (1)no effect (1)Okafor 2012Okafor 2012: 0.48 (0.27 to 0.86) (95% confidence interval)Okafor 2012 — 6.0% of the pooled weight; the marker's AREA is proportional to it0.48 (0.27 to 0.86)6.0%Lindqvist 2013Lindqvist 2013: 0.70 (0.49 to 1.00) (95% confidence interval)Lindqvist 2013 — 12.5% of the pooled weight; the marker's AREA is proportional to it0.70 (0.49 to 1.00)12.5%Moreau 2015Moreau 2015: 0.73 (0.55 to 0.96) (95% confidence interval)Moreau 2015 — 16.4% of the pooled weight; the marker's AREA is proportional to it0.73 (0.55 to 0.96)16.4%Silva 2017Silva 2017: 0.46 (0.20 to 1.06) (95% confidence interval)Silva 2017 — 3.3% of the pooled weight; the marker's AREA is proportional to it0.46 (0.20 to 1.06)3.3%Abdi 2019Abdi 2019: 1.38 (0.85 to 2.23) (95% confidence interval)Abdi 2019 — 8.3% of the pooled weight; the marker's AREA is proportional to it1.38 (0.85 to 2.23)8.3%Haddad 2021Haddad 2021: 0.65 (0.47 to 0.91) (95% confidence interval)Haddad 2021 — 13.4% of the pooled weight; the marker's AREA is proportional to it0.65 (0.47 to 0.91)13.4%Ito 2023Ito 2023: 1.13 (0.49 to 2.60) (95% confidence interval)Ito 2023 — 3.3% of the pooled weight; the marker's AREA is proportional to it1.13 (0.49 to 2.60)3.3%Hartmann 2014Hartmann 2014: 0.77 (0.37 to 1.58) (95% confidence interval)Hartmann 2014 — 4.3% of the pooled weight; the marker's AREA is proportional to it0.77 (0.37 to 1.58)4.3%Tanaka 2016Tanaka 2016: 0.93 (0.61 to 1.42) (95% confidence interval)Tanaka 2016 — 9.8% of the pooled weight; the marker's AREA is proportional to it0.93 (0.61 to 1.42)9.8%Novak 2018Novak 2018: 0.80 (0.52 to 1.22) (95% confidence interval)Novak 2018 — 9.9% of the pooled weight; the marker's AREA is proportional to it0.80 (0.52 to 1.22)9.9%Kowalczyk 2020Kowalczyk 2020: 1.38 (0.61 to 3.09) (95% confidence interval)Kowalczyk 2020 — 3.5% of the pooled weight; the marker's AREA is proportional to it1.38 (0.61 to 3.09)3.5%Brennan 2022Brennan 2022: 0.65 (0.41 to 1.01) (95% confidence interval)Brennan 2022 — 9.2% of the pooled weight; the marker's AREA is proportional to it0.65 (0.41 to 1.01)9.2%Programme setting: Centre-basedSubtotal (k = 7)Subtotal (k = 7): 0.74 (0.60 to 0.90)0.74 (0.60 to 0.90)Q = 11.39 on 6 dfProgramme setting: Home-basedSubtotal (k = 5)Subtotal (k = 5): 0.83 (0.63 to 1.08)0.83 (0.63 to 1.08)Q = 3.04 on 4 dfRandom effects (k = 12)Random effects (k = 12): 0.77 (0.64 to 0.93)0.77 (0.64 to 0.93)100.0%95% prediction interval95% prediction interval: 0.77 (0.53 to 1.11) — where a NEW study is expected to fall, not the interval of the average effect0.77 (0.53 to 1.11)StudyRR (95% CI)Weight0.20.512RR (95% CI)Heterogeneity: τ² = 0.0205 (DL), I² = 27%, Q = 15.10 on 11 df, P = 0.18Test for overall effect: t = −3.12 on 11 df, P = 0.0097τ² 95% interval (Q-profile): 0.00 to 0.254Test for subgroup differences: Q = 0.48 on 1 df, P = 0.49Study estimate — marker AREA ∝ weightStudy estimate — marker AREA ∝ weightPooled random-effects estimate (95% CI)95% prediction interval — where a NEW study fallsSubtotal: Centre-basedSubtotal: Home-basedInverse-variance pooling of 12 study-level estimates on the log scale. Fixed effect: Cochrane Handbook §10.3.1. Random effects: DerSimonian–Laird τ² =0.02053, reported with the Hartung–Knapp–Sidik–Jonkman interval on 11 df. Heterogeneity: Cochran's Q, Higgins & Thompson (2002) I² and H, τ² interval byQ-profile (Viechtbauer 2007). Prediction interval: Higgins, Thompson & Spiegelhalter (2009) on 10 df.Marker area is proportional to the study's random-effects weight, not its side length: side = maxSide·√(w/wₘₐₓ), so a study with half the weight has half theink.The diamond is the confidence interval of the AVERAGE effect. The dashed rule is the prediction interval — where a new study is expected to fall. They aredifferent questions and, with real heterogeneity, different answers.Rows given as event counts are computed from the 2×2 table by `stats/effects`, including any zero-cell handling that module's own rule applies.A subgroup comparison is observational even when every study in it is a randomised trial: the studies were not randomised to the subgroups. A difference hereis a hypothesis, not a finding.The test for subgroup differences has 1 degree of freedom over 12 studies and is therefore underpowered. A large p-value is not evidence that the subgroupsagree.1 palette colour(s) darkened or lightened to clear 3:1 against the panel.

Make it your own.

// Random-effects meta-analysis of twelve randomised trials drawn twice from one set of study rows: a forest plot with subgroups, pooled diamonds and the prediction interval, and a funnel plot with Egger's test and trim-and-fill.
//
// Every string below is EXAMPLE text from a fictional review: replace it.
//
// Each study is a contrast row carrying its own 2×2 table: events_a / n_a
// in the exercise-based cardiac rehabilitation arm, events_b / n_b under
// usual care, for all-cause hospital admission at 12 months. The risk
// ratio and its interval for every row, the inverse-variance weights,
// tau², I², Q, the subgroup diamonds, the test for subgroup differences,
// the prediction interval, Egger's regression and the funnel's pseudo-
// confidence contours are all computed from those counts. Change one
// count and both figures, and every statistic on them, move together;
// there is no pooled number typed anywhere in this document.
//
// Pooling: random effects, DerSimonian–Laird tau² with the
// Hartung–Knapp–Sidik–Jonkman interval, which Cochrane recommends when
// the number of studies is small. Subgroups (centre-based versus
// home-based programmes) were specified in the protocol before any data
// were extracted.

meta rehab_admission {
  title: "Cardiac rehabilitation versus usual care: admission at 12 months"
  measure: rr
  scale: log
  model: hksj
  level: 0.95
  k: 12
  n: 2406
  subgroup centre_based {
    variable: "Programme setting"
    category: "Centre-based"
    prespecified: true
    contrast okafor {
      label: "Okafor 2012"
      events_a: 12
      n_a: 60
      events_b: 25
      n_b: 60
    }
    contrast lindqvist {
      label: "Lindqvist 2013"
      events_a: 37
      n_a: 155
      events_b: 53
      n_b: 155
    }
    contrast moreau {
      label: "Moreau 2015"
      events_a: 58
      n_a: 210
      events_b: 80
      n_b: 210
    }
    contrast silva {
      label: "Silva 2017"
      events_a: 6
      n_a: 32
      events_b: 13
      n_b: 32
    }
    contrast abdi {
      label: "Abdi 2019"
      events_a: 29
      n_a: 91
      events_b: 21
      n_b: 91
    }
    contrast haddad {
      label: "Haddad 2021"
      events_a: 45
      n_a: 270
      events_b: 69
      n_b: 270
    }
    contrast ito {
      label: "Ito 2023"
      events_a: 9
      n_a: 38
      events_b: 8
      n_b: 38
    }
  }
  subgroup home_based {
    variable: "Programme setting"
    category: "Home-based"
    prespecified: true
    contrast hartmann {
      label: "Hartmann 2014"
      events_a: 10
      n_a: 48
      events_b: 13
      n_b: 48
    }
    contrast tanaka {
      label: "Tanaka 2016"
      events_a: 26
      n_a: 75
      events_b: 28
      n_b: 75
    }
    contrast novak {
      label: "Novak 2018"
      events_a: 28
      n_a: 114
      events_b: 35
      n_b: 114
    }
    contrast kowalczyk {
      label: "Kowalczyk 2020"
      events_a: 11
      n_a: 44
      events_b: 8
      n_b: 44
    }
    contrast brennan {
      label: "Brennan 2022"
      events_a: 20
      n_a: 66
      events_b: 31
      n_b: 66
    }
  }
}

view forest_plot: forest(rehab_admission)
view small_study_effects: funnel_plot(rehab_admission)