Introduction
Subgroup analyses are used to investigate whether a treatment effect is consistent across clinically important patient characteristics. Common subgroup variables include age, sex, disease stage, geographic region, baseline risk, biomarker status, prior treatment, and other factors defined in the protocol or statistical analysis plan.
A forest plot provides a compact way to display these subgroup-specific treatment effects together with their uncertainty. Each subgroup is represented by an effect estimate and confidence interval, allowing the reader to compare the direction, magnitude, and precision of the estimated treatment effect.
The forest plot is therefore not simply a decorative summary. It is a statistical display that should be tied closely to the endpoint definition, analysis population, treatment contrast, model, subgroup definition, and prespecified analysis plan.
What Is a Forest Plot?
A forest plot places several estimates on a common horizontal scale. The central marker represents the estimated treatment effect, while the horizontal line represents its confidence interval.
For a ratio measure such as a hazard ratio, risk ratio, or odds ratio, the line of no treatment effect is typically:
For a difference measure, such as a mean difference or risk difference, the null value is 0.
The Basic Structure
A typical subgroup forest plot contains:
- Subgroup label: the characteristic and category being displayed.
- Sample size: often the number of randomized or analyzed participants in that subgroup.
- Effect estimate: the treatment-versus-control estimate.
- Confidence interval: the uncertainty around the estimate.
- Reference line: the null treatment effect.
- Overall estimate: when appropriate, a primary analysis estimate displayed alongside the subgroup results.
An Actual Example
All values are simulated for teaching purposes. The apparent crossing of the null line should not be interpreted as proof of a treatment-by-subgroup interaction.
How to Read a Forest Plot
Start by identifying the effect measure and the direction of the treatment contrast. Then locate the null line and examine each subgroup estimate and confidence interval.
| Visual feature | Interpretation |
|---|---|
| Marker left of 1 for a ratio measure | Estimated effect favors treatment if treatment/control is defined in that direction. |
| Marker right of 1 | Estimated effect favors control under the same convention. |
| Confidence interval crosses 1 | The subgroup confidence interval includes the null value. |
| Confidence interval entirely below 1 | The estimated effect is compatible with benefit under the stated direction. |
| Very wide confidence interval | The subgroup estimate is imprecise, often because of limited information. |
| Different point estimates | The observed estimates differ, but this alone does not demonstrate heterogeneity. |
Choosing the Effect Measure
The forest plot should use the effect measure appropriate to the endpoint and primary analysis.
| Endpoint type | Common effect measure | Typical null value |
|---|---|---|
| Time-to-event | Hazard ratio | 1 |
| Binary | Risk ratio or odds ratio | 1 |
| Binary | Risk difference | 0 |
| Continuous | Mean difference | 0 |
| Continuous, differing scales | Standardized mean difference | 0 |
Consistency matters. If the primary analysis uses a hazard ratio, a subgroup forest plot intended to explain that analysis will usually be easiest to interpret when it uses the same estimand and treatment contrast.
Subgroup Definitions
A subgroup forest plot is only as good as its subgroup definitions. The analysis should specify how continuous variables are categorized and how clinically meaningful categories are constructed.
For example, age might be displayed as <65 versus ≥65, while a biomarker could be categorized as negative versus positive according to a prespecified assay rule.
Subgroup definitions should be applied consistently to the analysis dataset. Avoid silently changing cutoffs after seeing treatment results because this can introduce substantial bias.
Sample Size and Information in Subgroups
Subgroup estimates are often less precise than the overall treatment estimate because each subgroup contains fewer participants or fewer endpoint events.
A wide confidence interval should not be interpreted as evidence that the treatment does not work in the subgroup. It may simply reflect limited information.
Why Confidence Intervals Matter
The point estimate alone can be misleading. Consider two subgroup estimates of 0.60. If one has a 95% confidence interval of 0.45–0.80 and the other has an interval of 0.20–1.80, they do not provide the same level of information.
The first estimate is comparatively precise. The second is highly uncertain and is compatible with substantial benefit, little effect, or potentially harm.
A strong forest plot therefore gives visual prominence to the confidence intervals rather than relying only on the markers.
The Most Important Concept: Interaction
Suppose a trial reports:
- Subgroup A: HR = 0.60, 95% CI 0.45–0.80
- Subgroup B: HR = 0.90, 95% CI 0.65–1.25
It is tempting to conclude that the treatment works in A but not B. That conclusion is not justified solely from these two confidence intervals.
The relevant question is whether there is evidence that the treatment effect differs between A and B. This is the role of an interaction test.
Interaction Tests
An interaction model includes treatment, subgroup, and their interaction. Conceptually, for a model with treatment indicator T and subgroup indicator S, the model contains a term such as:
Outcome ~ Treatment + Subgroup + Treatment:Subgroup
The interaction term addresses whether the treatment effect changes as the subgroup changes.
The exact model depends on the endpoint. For a time-to-event analysis this may involve a treatment-by-subgroup interaction in a proportional hazards model; for a binary endpoint it may involve a logistic or other appropriate model; and for continuous endpoints it may involve a linear model or another prespecified method.
Separate Subgroup P-Values vs. Interaction P-Value
| Question | Appropriate evidence |
|---|---|
| Is the treatment effect different from the null within subgroup A? | Subgroup-specific estimate and confidence interval, with appropriate inferential context. |
| Is the treatment effect different from the null within subgroup B? | Subgroup-specific estimate and confidence interval, with appropriate inferential context. |
| Do treatment effects differ between A and B? | Treatment-by-subgroup interaction analysis. |
Prespecified vs. Exploratory Subgroups
Not all subgroup analyses have the same evidentiary status. Prespecified subgroup analyses are defined before examining the treatment results and are generally more credible than post hoc analyses selected because they produce an interesting pattern.
Exploratory subgroup analyses can still be useful. They may generate hypotheses for future studies or help investigate unexpected findings. Their conclusions, however, should be presented with appropriate caution.
Multiplicity
When many subgroup characteristics and categories are examined, the probability of observing apparently unusual findings by chance increases.
For example, a study might examine treatment effects across age, sex, race, region, disease stage, baseline severity, biomarker status, prior therapy, and several additional factors. Even if the treatment effect is genuinely homogeneous, some subgroup estimates may appear unusually large or small simply through random variation.
Multiplicity should therefore be considered in the protocol and SAP. The appropriate strategy depends on the purpose of the subgroup analysis, the regulatory context, and whether the analyses are confirmatory or exploratory.
Continuous Variables: Categorize or Model?
Forest plots often display categorized subgroups because categories are easy to read. However, categorizing a continuous variable can discard information and make results sensitive to arbitrary cutoffs.
For some questions, it may be preferable to investigate treatment effect modification using a continuous interaction term, potentially with a prespecified nonlinear structure such as splines.
If a categorical display is used, the cutoff should be scientifically justified and defined independently of the observed treatment effect whenever possible.
Missing Subgroup Information
Some participants may have missing values for a subgroup variable. The analysis plan should define how these participants are handled.
Potential approaches include a separate “Unknown” category, exclusion from that subgroup analysis, or a prespecified imputation strategy. The choice should be made based on the estimand, data characteristics, and SAP rather than convenience.
Randomization and Subgroup Balance
Randomization generally supports unbiased treatment comparisons in the overall randomized population. Within small subgroups, however, treatment groups can be numerically imbalanced simply by chance.
Subgroup analyses should not be interpreted as though randomization guarantees equally precise or equally balanced comparisons within every subgroup. Small cell counts can produce unstable estimates and wide confidence intervals.
What Does a Crossing Confidence Interval Mean?
A confidence interval crossing the null value means that the interval includes the null. It does not prove that there is no treatment effect.
For a hazard ratio of 0.75 with a 95% CI of 0.50–1.12, the point estimate suggests a favorable treatment effect under the stated direction, but the interval is compatible with a range of effects that includes the null.
The forest plot should therefore be read as a distribution of estimates and uncertainty, not as a collection of binary “significant/non-significant” labels.
Ordering Subgroups
Subgroups should normally be organized according to a logical clinical or analytical hierarchy rather than sorted by the magnitude of the observed treatment effect.
For example:
- Overall population
- Age
- Sex
- Disease stage
- Biomarker status
- Prior therapy
Within a subgroup, preserve a natural order such as younger/older, male/female, negative/positive, or stage III/stage IV.
Reference Lines and Direction Labels
The null line is essential. The figure should also make the direction of benefit explicit.
For example, a ratio-scale forest plot can place Favors treatment on the left and Favors control on the right, provided the treatment contrast and effect measure make that direction correct.
Do not assume that “left is better.” Whether lower or higher values are favorable depends on the endpoint and the way the effect measure was calculated.
Forest Plot vs. Other Clinical Trial Displays
| Display | Primary question | Typical use |
|---|---|---|
| Forest plot | How does the estimated treatment effect vary across subgroups? | Subgroup and sensitivity analyses |
| Kaplan-Meier plot | How does event-free probability evolve over time? | Time-to-event endpoints |
| Waterfall plot | How much did individual tumors shrink or grow? | Oncology tumor response |
| Spider plot | How did tumor burden change over time? | Longitudinal oncology response |
| Swimmer plot | How long did patients remain on treatment and when did events occur? | Patient-level oncology timelines |
Common Interpretation Errors
- “One subgroup is significant and another is not, so the treatment effects differ.” This is not an interaction test.
- “The confidence intervals overlap, so the effects are identical.” Overlap or non-overlap of individual confidence intervals is not a substitute for an interaction analysis.
- “A wide interval means no treatment effect.” It may instead indicate limited information.
- “The largest subgroup effect is the most important.” Large estimates can be unstable, particularly in small subgroups.
- “A post hoc subgroup with p<0.05 proves a subgroup-specific benefit.” Multiplicity and exploratory selection must be considered.
- “The forest plot is the analysis.” The figure displays results from an underlying statistical analysis; it does not replace the model or SAP.
- “All subgroup definitions are equally credible.” Prespecification, biological plausibility, and multiplicity matter.
Designing a Publication-Quality Forest Plot
A good forest plot should be compact without sacrificing statistical information.
- Use a clear, consistent effect scale.
- Show the null reference line.
- Display confidence intervals prominently.
- Include subgroup sample sizes when useful.
- Use consistent decimal precision.
- Keep subgroup labels concise but unambiguous.
- Include the treatment contrast in the title or footnote.
- State whether intervals are 95% and whether estimates are adjusted or unadjusted.
- Make the direction of benefit explicit.
- Use the same x-axis scale when comparing related panels.
Axis Scaling
Ratio measures are commonly displayed on a logarithmic axis because ratios are multiplicative and the values can span a wide range.
A log scale also makes reciprocal effects visually symmetric around the null. For example, a ratio of 0.5 and its reciprocal, 2, are equally distant from 1 on a log scale.
The axis range should be chosen deliberately. If an extreme subgroup estimate forces a very wide range, the other estimates may become difficult to distinguish.
Displaying Numerical Results Beside the Plot
Many publication-quality forest plots include a numerical results column containing the estimate and confidence interval, for example:
0.69 (0.56, 0.85)
This allows readers to obtain exact values without estimating them from the graphical position.
When space permits, numerical columns can also show subgroup sample sizes, event counts, or interaction p-values. Avoid overcrowding the figure with statistics that do not support the primary interpretation.
R Data Structure
A convenient plotting dataset contains one row per subgroup result.
subgroup_data <- data.frame(
subgroup = c("Age <65", "Age ≥65",
"Male", "Female"),
n = c(214, 186, 231, 169),
estimate = c(0.62, 0.74, 0.67, 0.71),
lower = c(0.43, 0.49, 0.49, 0.47),
upper = c(0.89, 1.12, 0.92, 1.07)
)
R Implementation With ggplot2
The forest plot can be built by plotting the point estimate and confidence interval on a log-scaled x-axis.
library(ggplot2)
ggplot(
subgroup_data,
aes(
y = reorder(subgroup, estimate),
x = estimate,
xmin = lower,
xmax = upper
)
) +
geom_vline(
xintercept = 1,
linetype = "dashed"
) +
geom_errorbarh(
height = 0.15
) +
geom_point(
size = 3
) +
scale_x_log10(
breaks = c(0.25, 0.5, 1, 2, 4)
) +
labs(
x = "Hazard Ratio (95% CI)",
y = NULL
) +
theme_classic()
Depending on the installed ggplot2 version and preferred implementation, horizontal intervals can also be constructed with geom_errorbar() using a flipped coordinate system, or with specialized forest-plot packages.
Adding the Numerical Estimate
subgroup_data$label <- sprintf( "%.2f (%.2f, %.2f)", subgroup_data$estimate, subgroup_data$lower, subgroup_data$upper )
The label can then be placed in a dedicated annotation column or assembled as part of a more complex figure layout.
Faceting by Treatment or Endpoint
If several related endpoints are displayed, separate panels can be useful. Keep the statistical meaning of each panel explicit and avoid mixing effect measures without clear labels.
ggplot(
subgroup_data,
aes(
x = estimate,
y = subgroup,
xmin = lower,
xmax = upper
)
) +
geom_vline(xintercept = 1, linetype = "dashed") +
geom_errorbarh(height = 0.15) +
geom_point(size = 2.8) +
facet_wrap(~ endpoint) +
scale_x_log10() +
theme_classic()
Interaction Results in the Figure
Interaction p-values can be displayed when they are part of the planned presentation, but they should not be used as the sole explanation for the subgroup pattern.
A good figure can show the subgroup estimates and confidence intervals while the accompanying text or table reports the treatment-by-subgroup interaction results.
The visual difference between point estimates is descriptive. The interaction analysis determines whether the observed difference is supported by statistical evidence of effect modification.
Forest Plots for Time-to-Event Endpoints
For survival endpoints, subgroup forest plots commonly display hazard ratios with confidence intervals. The subgroup estimate should come from the prespecified time-to-event model or an appropriately defined subgroup model.
Care is required when proportional hazards assumptions, stratification factors, time-varying effects, competing risks, or other model features are part of the primary analysis. The forest plot should faithfully represent the estimand and model used for the analysis.
Forest Plots for Binary Endpoints
For binary endpoints, risk ratios, odds ratios, and risk differences can all be used depending on the analysis strategy.
The choice should be consistent with the estimand and primary analysis. A risk difference and an odds ratio answer different questions, so they should not be substituted merely because one produces a more visually convenient forest plot.
Forest Plots for Continuous Endpoints
For continuous endpoints, mean differences are often straightforward to interpret when all groups use the same scale. Standardized mean differences may be useful when outcomes are measured on different scales, but they have a less intuitive clinical interpretation.
Forest Plots and Adjusted Analyses
Subgroup estimates may come from adjusted or unadjusted models. The figure should state which is being shown.
Do not compare an adjusted overall estimate to unadjusted subgroup estimates without explaining the difference. Ideally, the subgroup estimates should correspond to a coherent analysis strategy and estimand.
Subgroups With Very Few Events
Rare events can produce unstable estimates, extremely wide confidence intervals, or model convergence problems. In some situations an estimate may not be estimable using the planned model.
The correct response is not to hide problematic subgroups. The analysis should follow the prespecified handling rule, and the figure or footnote should make important estimation limitations transparent.
When a Forest Plot Should Not Be Used Alone
A forest plot is most useful when accompanied by the underlying analysis and appropriate context. It should not be used alone to support claims of treatment benefit in particular patient categories.
For confirmatory subgroup claims, the reader should be able to determine:
- Which subgroups were prespecified.
- What analysis population was used.
- What effect measure and treatment contrast were used.
- How confidence intervals were calculated.
- Whether interaction tests were performed.
- How multiplicity was handled or considered.
- Whether any subgroup definitions were exploratory.
Quality-Control Checklist
Common Mistakes
- Using subgroup p-values as evidence of heterogeneity. Use an interaction analysis to address whether treatment effects differ.
- Changing subgroup cutoffs after seeing results. This can introduce bias and should not be presented as though it were prespecified.
- Ignoring small subgroup sizes. Precision depends on the amount of information, not merely the existence of a point estimate.
- Using an inappropriate effect measure. Match the forest plot to the endpoint and estimand.
- Failing to label the treatment direction. Readers should know immediately which side favors which treatment.
- Overinterpreting confidence intervals. A confidence interval crossing the null does not prove no effect.
- Sorting by observed effect size. This can exaggerate visual differences and makes the figure harder to compare across analyses.
- Hiding exploratory analyses. Clearly distinguish prespecified and exploratory findings.
- Overcrowding the figure. A forest plot with too many rows, statistics, and annotations can become unreadable.
- Failing to validate the plot. Every estimate and confidence interval should be traceable to the analysis output.
Final Perspective
A well-designed forest plot turns a potentially unwieldy set of subgroup results into a compact statistical summary. Its greatest value is not that it makes “significant” results easy to spot, but that it allows readers to see the magnitude and precision of treatment effects across clinically relevant groups.
The most important interpretive discipline is to separate three questions: what is the estimated effect in each subgroup?, how precise is each estimate?, and is there evidence that the treatment effect truly differs between subgroups? The first two are displayed directly by the forest plot; the third requires an appropriate interaction analysis.
Summary
- Forest plots display subgroup-specific treatment effects and confidence intervals.
- The null value is usually 1 for ratio measures and 0 for difference measures.
- Wide intervals often reflect limited information rather than absence of treatment benefit.
- “Significant in one subgroup, not significant in another” is not an interaction test.
- Treatment-by-subgroup interaction analyses are central to claims of effect modification.
- Prespecified subgroup analyses generally carry greater evidentiary weight than post hoc findings.
- Multiplicity becomes increasingly important as the number of subgroup analyses grows.
- Effect measure, treatment direction, subgroup definitions, and analysis population must be clearly specified.
- Every displayed value should be traceable to the underlying analysis output.