Lucas Monteiro DelgadoMD candidate · UFMG, Brazil
Toolkit · 06 of 13

Subgroup analysis

Pre-specified subgroups and tests for subgroup differences.

1

What it is

A subgroup analysis splits the studies by a characteristic fixed at the study level, such as design, type of procedure or length of follow-up, pools each group separately, and asks whether the effect differs between them.

The answer comes from the test for subgroup differences, not from comparing P values: a significant effect in one subgroup and a non-significant one in the other does not mean that the effect differs.

Subgroups are made of studies, not of randomized patients, so the comparison is observational: a difference may come from anything else those studies share. A few pre-specified subgroups, each with a clinical rationale, give credible answers; many post hoc ones mostly produce chance findings.

Worked exampleCompensatory sweating, by study design
StudiesOdds ratio (95% CI)I²
Observational70.34 (0.16-0.73)78%
RCT40.42 (0.19-0.94)0%
Both subgroups favor T2-sparingsimilar effects in RCTs and observational studiesTest for subgroup differences: P = 0.73no evidence that design changes the effect

The heterogeneity sits within the observational studies, not between the two designs.

2

When to use it

Use it when

  • The subgroups were pre-specified in the protocol, each with a clinical reason to expect a different effect.
  • The characteristic is categorical and defined at the study level: design, type of procedure, technique, follow-up period.
  • Each subgroup has at least two studies, and preferably the analysis has 10 or more studies overall.
  • There is heterogeneity you want to explain, or a clinical question about one group of patients or procedures.

Choose another tool when

  • The characteristic is continuous, such as mean age or dose: use meta-regression rather than cutting it into categories.
  • You want to know whether a single study drives the result: use sensitivity analysis.
  • The characteristic varies between patients within each study, such as sex or age: study-level subgroups cannot answer it; it needs individual patient data or trials reporting results by subgroup.
3

The template, parameter by parameter

Click a highlighted argument to see what it does and which values to use. Picking a value updates the code.

# m: the model from the binary or continuous tool
m_sg <- update(m,
               subgroup = design,
                = FALSE,
                = TRUE)

# forest plot: see section 4
4

The forest plot, parameter by parameter

These arguments change only how the result is shown, not the result itself. Click one to see the options.

png("subgroups.png",
    width = 5500, height = 1400 + 200 * m_sg$k, res = 500)
forest(m_sg,
        = studlab,
        = TRUE,
        = FALSE,
        = "grey",
        = TRUE,
        = TRUE,
        = "navyblue",  = "black",
       label.left = "Favors intervention",
       label.right = "Favors control")
dev.off()
5

How to read the results

Test for subgroup differences

  • This is the result to report: Q between subgroups, its degrees of freedom and P value.
  • The test has low power, so P < 0.10 is often taken as evidence of a difference.
  • Never compare the P values of the subgroups with each other.

Within the subgroups

  • Compare the subgroup estimates and their intervals with the overall result.
  • Check whether I² falls within the subgroups: if it does, the characteristic explains part of the heterogeneity.
  • A subgroup with one or two studies gives an unstable estimate.

Credibility

  • Was the subgroup pre-specified, with the direction of the difference predicted?
  • Is the difference consistent across related outcomes, and is the number of subgroup analyses small?
  • Could another study characteristic explain it? Tools such as ICEMAN formalize these questions.
6

In my work

Subgroup analyses from two published reviews, next to the call behind them. The first figure was redrawn from the published study data and reproduces the reported results. Click a figure to enlarge it.

Compensatory sweating, by study designOdds ratio, 11 studies (4 RCTs, 7 observational); test for subgroup differences P = 0.73. From J Cardiothorac Surg, 2026 ↗
m_sg <- update(m,                   # main model
               subgroup = design,   # RCT or observational
               tau.common = FALSE)  # tau² per subgroup

forest(m_sg,
       col.subgroup = "grey",       # subtotals in grey
       print.subgroup.name = FALSE, # heading "RCT" only
       sort.subgroup = TRUE)        # alphabetical
Need for transfusion, by type of surgeryRisk ratio, 12 trials. Neither subgroup is significant on its own, yet the overall effect is, and the test for subgroup differences is P = 0.64: the effect does not differ by type of surgery. From JAMA Surg, 2026 ↗
m_sg <- update(m,                   # main model
               subgroup = type)     # type of surgery

forest(m_sg,
       col.subgroup = "grey",       # subtotals in grey
       print.subgroup.name = FALSE) # heading only
7

References

  1. Higgins JPT, Thomas J, Chandler J, et al. Cochrane Handbook for Systematic Reviews of Interventions, version 6.5. Cochrane; 2024. Chapter 10.11 (investigating heterogeneity).
  2. Borenstein M, Higgins JPT. Meta-analysis and subgroups. Prev Sci. 2013;14:134-143.
  3. Richardson M, Garner P, Donegan S. Interpretation of subgroup analyses in systematic reviews: a tutorial. Clin Epidemiol Glob Health. 2019;7:192-198.
  4. Sun X, Ioannidis JPA, Agoritsas T, Alba AC, Guyatt G. How to use a subgroup analysis: users' guide to the medical literature. JAMA. 2014;311:405-411.
  5. Schandelmaier S, Briel M, Varadhan R, et al. Development of the Instrument to assess the Credibility of Effect Modification Analyses (ICEMAN) in randomized controlled trials and meta-analyses. CMAJ. 2020;192:E901-E906.
  6. Thompson SG, Higgins JPT. How should meta-regression analyses be undertaken and interpreted? Stat Med. 2002;21:1559-1573.