Tutorials › Causal Inference › Marginal Standardization for Subgroup Effects

Effect Modification and Subgroup Effects · Tutorial 860 of 972

Marginal Standardization for Subgroup Effects

Use predicted outcomes under each treatment, averaged over the covariate distribution within a subgroup, to estimate subgroup-specific causal effects.

Advanced 10 min read

What You'll Learn

  • Define a subgroup-specific average treatment effect using potential outcomes.
  • State the assumptions that identify subgroup-specific risks from observed data.
  • Calculate standardized risks by averaging predicted probabilities over subgroup covariate values.
  • Contrast a marginal risk difference with a conditional model coefficient.
  • Recognize when the target covariate distribution or model predictions make standardization inappropriate.

From a Treatment Model to a Subgroup Effect

A regression model may describe how treatment and covariates relate to an outcome, but its coefficients are not automatically the causal effects of interest. For a binary outcome, a logistic model gives conditional odds on its model scale. A clinician or policy analyst may instead want to know the average change in outcome risk for a particular subgroup, allowing the subgroup’s covariates to vary as they do in the target population. Marginal standardization answers this question by predicting each subgroup member’s outcome under each treatment and averaging those predictions.

The key is to average over the covariate distribution of the subgroup being studied. Thus, the procedure gives a marginal effect for that subgroup, rather than an effect for a hypothetical person whose covariates have been fixed at selected values. The result depends on both the fitted outcome model and the population over which predictions are averaged.

Definition: Let \(A\) be a binary treatment, \(Y(a)\) the potential outcome under treatment level \(a\), and \(S\) a baseline subgroup indicator. The subgroup-specific average treatment effect for subgroup \(s\), on the risk-difference scale for a binary outcome, is $$ \mathrm{ATE}(s)=E\{Y(1)-Y(0)\mid S=s\}. $$ For a binary outcome, this is the difference between the subgroup’s mean potential-outcome risks under treatment and control. A negative value means lower outcome risk under treatment.

Identification and the Standardization Formula

The target quantity is defined using potential outcomes, which are not both observed for any one person. To identify it from observed data, suppose \(L\) is a set of measured baseline covariates used to adjust for treatment assignment. The following assumptions are sufficient for the standardization formula:

  • Consistency: for a person who receives treatment \(A=a\), the observed outcome equals \(Y(a)\), provided the treatment is well defined.
  • Conditional exchangeability: within levels of \(L\) and subgroup \(S\), treatment assignment is independent of the potential outcomes: \(Y(a)\perp A\mid L,S\), for \(a=0,1\). In a randomized study, random assignment can support this condition; in an observational study, it requires that the adjustment variables suffice to control confounding.
  • Positivity: among people in subgroup \(s\) with covariate values represented in the target population, both treatment levels have positive probability: \(0<P(A=a\mid L=l,S=s)\) for \(a=0,1\).
  • Appropriate outcome prediction: the fitted model estimates the conditional mean outcome \(E(Y\mid A=a,L=l,S=s)\) adequately over the covariate values being averaged.

Consistency and conditional exchangeability let us replace a potential-outcome mean with a conditional observed-outcome mean. Positivity ensures those conditional means are informed by data at both treatment levels. Applying the law of total expectation within subgroup \(s\) gives:

$$ E\{Y(a)\mid S=s\} = \sum_l E(Y\mid A=a,L=l,S=s)P(L=l\mid S=s). $$

For continuous covariates, the sum is replaced by an integral. This formula shows the two ingredients of standardization: predict the outcome under a specified treatment at each covariate value, then average those predictions using the subgroup’s covariate distribution. It is not enough to compare predictions at one chosen covariate value unless that is the explicitly defined target.

Estimation: Fit a model for the conditional outcome mean \(m(a,l,s)=E(Y\mid A=a,L=l,S=s)\). For each member \(i\) of subgroup \(s\), calculate \(\hat m(1,L_i,s)\) and \(\hat m(0,L_i,s)\). Then average separately: $$ \widehat{\mu}_a(s)=\frac{1}{n_s}\sum_{i:S_i=s}\hat m(a,L_i,s), \qquad \widehat{\mathrm{ATE}}(s)=\widehat{\mu}_1(s)-\widehat{\mu}_0(s), $$ where \(n_s\) is the number of people in subgroup \(s\). The covariate values in both averages are the same subgroup members’ observed baseline values; only the treatment value supplied to the model changes.

With a logistic outcome model, the prediction must be converted to a probability before averaging. If the model’s linear predictor under treatment \(a\) is \(\hat\eta(a,l,s)\), the predicted risk is \(\hat m(a,l,s)=1/\{1+\exp[-\hat\eta(a,l,s)]\}\). Averaging linear predictors or odds and then calling the result a risk does not implement this formula. The model needs sufficient flexibility to represent the conditional risks relevant to the target; its specification is not guaranteed correct merely because it is logistic.

Worked Example: Standardizing Risks Within a High-Risk Subgroup

Suppose a hypothetical study estimates the risk of a binary complication under a preventive treatment. In the baseline high-risk subgroup, 60% have a comorbidity and 40% do not. A fitted outcome model gives the following predicted risks. Assume the treatment and subgroup are well defined, the listed predictions are adequately estimated, and the identification and positivity assumptions above hold for this target subgroup.

Comorbidity statusSubgroup proportionPredicted risk if untreatedPredicted risk if treated
Yes0.600.500.30
No0.400.200.10

The standardized untreated risk is the average of the untreated predictions using the high-risk subgroup’s covariate proportions:

$$ \widehat{\mu}_0(1) =(0.60)(0.50)+(0.40)(0.20) =0.30+0.08 =0.38. $$

The corresponding treated risk is:

$$ \widehat{\mu}_1(1) =(0.60)(0.30)+(0.40)(0.10) =0.18+0.04 =0.22. $$

Therefore, the estimated subgroup-specific risk difference is \(0.22-0.38=-0.16\). Under the stated assumptions, treatment is estimated to reduce complication risk in this subgroup by 16 percentage points on average. This is a marginal risk difference for the high-risk subgroup, not a comparison for either comorbidity category alone.

Why the Averaging Distribution Matters

The covariate distribution in the average defines the population to which the standardized risks refer. For a subgroup-specific effect, averaging over members of that subgroup targets its own distribution of measured covariates. Using a different distribution—for example, the distribution in the full study population—answers a different question, even if the same fitted model supplies the predictions.

A subgroup’s treatment effect can differ from another subgroup’s effect because treatment effects vary across covariate values, because the subgroups have different covariate distributions, or both. The standardized contrast incorporates the subgroup’s distribution rather than holding covariates at an arbitrary reference value. It is therefore useful to report the subgroup definition, the covariates used for adjustment, the target distribution used for averaging, and the effect scale.

Worked Example: The Same Predictions, a Different Target

Consider a second hypothetical subgroup. Twenty percent have a comorbidity and 80% do not. Suppose the fitted model predicts untreated risks of 0.55 and 0.25, and treated risks of 0.40 and 0.15, for those with and without comorbidity, respectively. Assume these predictions satisfy the same modeling and identification conditions for the subgroup.

Averaging over this subgroup’s own covariate distribution gives:

$$ \widehat{\mu}_0(2)=(0.20)(0.55)+(0.80)(0.25)=0.11+0.20=0.31, $$ $$ \widehat{\mu}_1(2)=(0.20)(0.40)+(0.80)(0.15)=0.08+0.12=0.20. $$

The subgroup-specific risk difference is \(0.20-0.31=-0.11\), or an estimated 11-percentage-point reduction. Now suppose, only for comparison, that the same predictions were averaged using a different target distribution with 60% having comorbidity and 40% without. That would yield untreated risk \( (0.60)(0.55)+(0.40)(0.25)=0.43\) and treated risk \( (0.60)(0.40)+(0.40)(0.15)=0.30\), for a difference of \(-0.13\). This is not the effect standardized to subgroup 2. The predictions have not changed, but the target population has.

Using a Regression Model Without Reading the Effect Off Its Coefficients

A regression model is a tool for generating the conditional predictions needed for standardization. Its treatment coefficient is not generally the desired marginal subgroup effect. In logistic regression, the coefficient for treatment describes a conditional log-odds contrast under the model, not a subgroup-average risk difference. Even a model with a treatment-by-subgroup term does not make that term equal to a standardized risk difference. Standardization instead produces risks on the probability scale first and then contrasts those risks.

The model should allow the outcome predictions to vary in ways relevant to the data and estimand. For instance, if treatment associations differ across subgroups, the prediction model must allow that pattern rather than forcing identical conditional treatment contrasts by construction. The exact terms depend on the scientific setting and data; the essential requirement is adequate prediction of the conditional outcome means across the target covariate values under both treatment settings. A model that predicts well only in the observed treatment groups may still extrapolate poorly when asked to predict a different treatment for those same covariate profiles.

Worked Example: Computing Predictions From a Logistic Model

In a hypothetical subgroup, suppose a fitted logistic model gives an untreated predicted risk of 0.20 and a treated predicted risk of 0.12 for each of two covariate profiles. In the subgroup, 25% of members have profile 1 and 75% have profile 2. For this simplified example, assume the model gives these same predictions for both profiles, and assume the identification, positivity, and outcome-model conditions hold.

The standardized risks are the weighted averages:

$$ \widehat{\mu}_0(s)=(0.25)(0.20)+(0.75)(0.20)=0.20, $$ $$ \widehat{\mu}_1(s)=(0.25)(0.12)+(0.75)(0.12)=0.12. $$

Thus the standardized risk difference is \(0.12-0.20=-0.08\), an 8-percentage-point estimated reduction. Suppose, for illustration, that the model’s linear predictors for these risks are \(\log(0.20/0.80)=-1.386\) and \(\log(0.12/0.88)\approx-1.992\). Averaging or subtracting those log-odds values would produce a contrast on the log-odds scale, not the 8-percentage-point risk difference. The risk difference follows from converting predictions to probabilities and averaging on the risk scale.

A Practical Standardization Sequence

The calculation can be organized as a short sequence. It keeps the estimand, the prediction model, and the averaging population distinct.

1
Define the subgroup estimand.
Specify the baseline subgroup, outcome, treatment contrast, and effect scale. For example, a subgroup-specific risk difference compares the mean potential-outcome risks under treatment and control within that subgroup.
2
Fit the conditional outcome model.
Model the observed outcome using treatment, subgroup, and relevant baseline covariates. Check that the model can provide predictions for both treatment settings over the subgroup’s covariate values.
3
Predict both treatment outcomes.
For every member of the target subgroup, obtain a predicted outcome under treatment and a separate prediction under control, leaving baseline covariates at that member’s observed values.
4
Average and contrast.
Average the treatment predictions to estimate the treated risk, average the control predictions to estimate the control risk, and subtract in the stated order. Report the averaging population and units.

Common Mistakes and Interpretation

  • Using the coefficient as the subgroup effect. A treatment coefficient in a logistic model is not a standardized risk difference. Convert predictions to risks, average within the target subgroup, and then form the intended contrast.
  • Averaging over the wrong population. Full-sample covariate weights do not generally target a subgroup-specific effect. Use the covariate distribution of the subgroup unless another target population is explicitly intended.
  • Ignoring positivity or extrapolation. If some covariate profiles in the subgroup have no data at one treatment level, predictions under that level rely on extrapolation and may not identify the subgroup effect from the observed data.
  • Calling an adjusted association causal without justification. Standardization is a calculation, not a cure for unmeasured confounding or a misspecified outcome model. Its causal interpretation depends on the stated assumptions.

A standardized estimate is a point estimate; it does not by itself describe its statistical uncertainty. Nor does a subgroup contrast alone establish that effects differ between subgroups. The central contribution of marginal standardization is more specific: it translates a conditional outcome model into subgroup-average risks and contrasts for a clearly defined covariate distribution.

Key takeaway: To estimate a subgroup-specific average treatment effect by marginal standardization, predict each subgroup member’s outcome under both treatment levels, average each set of predictions over that subgroup’s covariate distribution, and contrast the resulting marginal risks. A causal interpretation additionally requires valid identification assumptions and adequate outcome prediction.

Check Your Understanding

Try these questions before reviewing the definitions and examples.

  1. In one sentence, define the subgroup-specific average treatment effect on the risk-difference scale using potential outcomes.
  2. Why does marginal standardization average predictions over the covariate distribution of the subgroup rather than evaluate everyone at one reference covariate profile?
  3. A logistic model predicts risks for each subgroup member under treatment and control. What needs to happen to those predictions before calculating a standardized risk difference?
  4. Name two assumptions needed to give the standardized contrast a causal interpretation, and briefly state what each contributes.
  5. What target population is described if predictions for one subgroup are averaged using the full study population’s covariate distribution?
Clinical Biostats