Tutorials › Propensity Score Matching and Instrumental Variables › A Worked Example of Identification by Stratification

Causal Effects, Ignorability and Positivity · Tutorial 17 of 699

A Worked Example of Identification by Stratification

Learn how to calculate standardized means and their causal contrast from stratum-specific outcome summaries, and how to check that the calculation matches the intended target population.

Beginner 10 min read

What You'll Learn

  • Define stratum-specific observed outcome means and target-population weights
  • Calculate treatment-specific standardized means from a small table
  • Subtract standardized means to obtain the estimated average causal effect
  • Explain why the crude difference can differ from the standardized contrast
  • Check the assumptions and data structure needed to interpret the contrast causally
  • Recognize how changing the target population changes the standardized result

From Stratum-Specific Outcomes to a Causal Contrast

When treatment groups contain different mixes of people, their crude outcome averages compare both treatment status and covariate composition. Stratification makes that composition visible: calculate an outcome mean for each treatment group within each covariate stratum, then average those means using one common set of stratum weights. The result is a pair of treatment-specific standardized means and, by subtraction, a standardized contrast.

This tutorial works through that calculation. The weights determine the population to which the contrast refers, so they are not a cosmetic detail. The introductory material on covariate standardization gives the general identification argument; here the emphasis is on carrying it out from a table and checking what the resulting number means.

Definition: Let \(A\) be a binary treatment, with \(A=1\) denoting treatment and \(A=0\) denoting control. Let \(X\) denote a set of pretreatment covariates, represented here by a finite set of strata. For stratum \(x\), let \(\bar{Y}_{a,x}\) be the observed mean outcome among individuals with \(A=a\) and \(X=x\). Given target-population stratum weights \(w_x\), where \(w_x\geq 0\) and \(\sum_x w_x=1\), the treatment-specific standardized mean is \(\hat{\mu}^{\mathrm{std}}_a=\sum_x w_x\bar{Y}_{a,x}\). The standardized contrast is \(\hat{\tau}^{\mathrm{std}}=\hat{\mu}^{\mathrm{std}}_1-\hat{\mu}^{\mathrm{std}}_0\).

For a sample representing the target population, a common choice is \(w_x=\hat{P}(X=x)=N_x/N\), where \(N_x\) is the number of sample members in stratum \(x\) and \(N\) is the total sample size. These weights make both treatment-specific means refer to the covariate distribution of the whole sample. Other target populations can call for different weights, but the intended target must be stated.

When the Standardized Contrast Is Causal

The arithmetic produces a standardized association whether or not the assumptions for causal interpretation hold. For a causal interpretation, suppose the treatment is well-defined, \(Y(a)\) denotes the potential outcome under treatment state \(a\), and the following conditions apply to the target population:

  • Consistency: for a person who receives treatment \(A=a\), the observed outcome equals that person’s potential outcome under that treatment: \(Y=Y(a)\).
  • Conditional exchangeability: within each stratum \(x\), treatment assignment is independent of the potential outcomes: \(Y(a)\perp A\mid X=x\), for \(a=0,1\).
  • Positivity: each stratum with positive weight in the target population contains individuals who could receive either treatment; in the observed data, both treatment groups must be represented to calculate both stratum means.

Under these conditions, the population mean potential outcome under treatment state \(a\) can be expressed using observed outcomes within strata:

$$ E[Y(a)] =\sum_x E[Y(a)\mid X=x]P(X=x) =\sum_x E[Y(a)\mid A=a,X=x]P(X=x) =\sum_x E[Y\mid A=a,X=x]P(X=x). $$

The first equality averages over the target distribution of \(X\). Conditional exchangeability gives the second equality, and consistency gives the third. In a table, the within-stratum observed means estimate the conditional expectations, while the chosen weights represent the target distribution. Subtracting the standardized mean for \(a=0\) from the standardized mean for \(a=1\) estimates the average treatment effect in that target population. This is an identification argument, not a guarantee that the assumptions are true.

For the calculation to match this argument, the strata must be defined using pretreatment covariates and the same weights must be used for both treatment-specific means. The outcome scale also matters: if the outcome is measured in days, both means and their difference are in days. The calculation itself does not provide a standard error or confidence interval.

Worked Example: Standardizing Two Stratum Means

Suppose a hypothetical sample records a continuous outcome in points and divides participants into two pretreatment risk strata. The table gives the number of people and the mean outcome in each treatment-by-stratum cell.

StratumAll participantsTreated: countTreated: mean outcomeControl: countControl: mean outcome
Lower risk60208406
Higher risk4030141012
Total10050—50—

Use the full sample as the target population. Its stratum weights are \(w_{\text{lower}}=60/100=0.60\) and \(w_{\text{higher}}=40/100=0.40\). Both strata include treated and control participants, so both treatment-specific means can be calculated from the table.

The standardized treated mean is

$$ \hat{\mu}^{\mathrm{std}}_1 =(0.60)(8)+(0.40)(14) =4.8+5.6 =10.4\text{ points}. $$

The standardized control mean uses the same weights:

$$ \hat{\mu}^{\mathrm{std}}_0 =(0.60)(6)+(0.40)(12) =3.6+4.8 =8.4\text{ points}. $$

Therefore, the standardized contrast is \(10.4-8.4=2.0\) points. If consistency, conditional exchangeability, positivity, and the target-population interpretation are justified, this estimates an average causal effect of treatment on the point scale for a population with the sample’s 60% lower-risk and 40% higher-risk composition.

For comparison, the crude treated mean is \(\{(20)(8)+(30)(14)\}/50=580/50=11.6\) points. The crude control mean is \(\{(40)(6)+(10)(12)\}/50=360/50=7.2\) points, giving a crude difference of \(4.4\) points. The treated group has more higher-risk participants than the control group; standardization replaces those different group compositions with the same specified 60%/40% composition. The crude difference is not the calculation requested by the standardized estimand.

Reading the Table Before Calculating

A reliable calculation starts by identifying three pieces of information: which variables define the strata, the target-population share of each stratum, and the outcome mean for each treatment state within each stratum. A table may report counts, means, or both. Counts are useful for checking the weights and for seeing whether a cell is empty; the stratum mean and the target weight are the quantities used directly in standardization.

The target weights need not equal the proportion of treated participants in each stratum or the proportion of controls in each stratum. Those are treatment-specific compositions. If the goal is to compare treatment-specific means for the full sample, use the full-sample composition for both. Also verify that the weights sum to one. If they do not, check whether a stratum was omitted or whether the counts use a different target population than intended.

Worked Example: Three Strata and a Weighted Sum

In a hypothetical study, the outcome is symptom-free days over a fixed follow-up period. The target sample contains 20 people in stratum A, 12 in stratum B, and 8 in stratum C. Each stratum has participants in both treatment groups. The observed means are as follows.

StratumTarget countTreated mean (days)Control mean (days)
A2032
B1287
C81511

There are 40 people in total, so the target weights are \(20/40=0.50\), \(12/40=0.30\), and \(8/40=0.20\). They sum to \(1.00\). For treatment, the weighted mean is

$$ \hat{\mu}^{\mathrm{std}}_1 =(0.50)(3)+(0.30)(8)+(0.20)(15) =1.5+2.4+3.0 =6.9\text{ days}. $$

For control,

$$ \hat{\mu}^{\mathrm{std}}_0 =(0.50)(2)+(0.30)(7)+(0.20)(11) =1.0+2.1+2.2 =5.3\text{ days}. $$

The standardized contrast is \(6.9-5.3=1.6\) symptom-free days. The stratum-specific contrasts are \(1\), \(1\), and \(4\) days. Their weighted average is \((0.50)(1)+(0.30)(1)+(0.20)(4)=1.6\) days, which agrees with subtracting the two standardized means. That agreement is a useful arithmetic check.

The result refers to the sample’s specified stratum composition. It does not say that every person gains 1.6 days, nor does it establish that the treatment caused the difference unless the identification assumptions are credible.

Weights Define the Target

The same stratum-specific means can produce different standardized means if the target population has a different distribution of covariates. That is not a contradiction: the average causal effect can vary across populations when treatment effects differ across strata. State the target distribution whenever reporting a standardized contrast.

Worked Example: Reweighting to a Different Target Population

Use the three-stratum means from the previous hypothetical example, but suppose the scientific question concerns a target population with weights 0.25 in A, 0.25 in B, and 0.50 in C. These are target weights, not the sample proportions. The treatment-specific standardized means for this target are

$$ \hat{\mu}^{\mathrm{std}}_1 =(0.25)(3)+(0.25)(8)+(0.50)(15) =0.75+2.00+7.50 =10.25\text{ days}, $$

and

$$ \hat{\mu}^{\mathrm{std}}_0 =(0.25)(2)+(0.25)(7)+(0.50)(11) =0.50+1.75+5.50 =7.75\text{ days}. $$

The standardized contrast is \(10.25-7.75=2.50\) days. It also equals the weighted stratum-specific contrasts: \((0.25)(1)+(0.25)(1)+(0.50)(4)=2.50\) days. The contrast differs from the earlier 1.60-day result because this target gives more weight to stratum C, where the observed treatment-control difference is larger. A causal interpretation for this new target also requires that the stratum-specific data support estimation for the target’s strata and that the causal assumptions apply there.

Checks, Alternatives, and Common Errors

Before interpreting a result, check the calculation and its causal basis. Confirm that the stratum weights correspond to the named target population and sum to one; confirm that each cell mean is paired with the correct treatment label; and verify that every positively weighted stratum has observations in both treatment groups. A missing treatment-by-stratum cell means its corresponding observed mean cannot be computed from the table. That is a warning that the standardized calculation is not directly supported for that target, not a reason to silently assign the missing mean a value.

Also consider whether the covariates defining the strata were measured before treatment. Conditioning on a variable affected by treatment can change the causal question and does not serve as ordinary pretreatment adjustment. Conditional exchangeability is a substantive assumption: a balanced-looking table of measured strata cannot establish that all confounding has been removed.

The crude difference in means is simpler but leaves treatment groups with their observed, potentially different covariate compositions. Regression adjustment is another way to adjust for covariates, but its result can depend on model specification. Matching constructs a comparison using treated and control units with similar covariates and can target a different population. These approaches are not interchangeable merely because each is called “adjustment”; identify the target estimand and assumptions before comparing their results.

  • Pitfall: averaging stratum effects without weights. The unweighted average gives every stratum equal importance, even when the target population has very different proportions in those strata. Use \(\sum_x w_x(\bar{Y}_{1,x}-\bar{Y}_{0,x})\) with weights chosen for the target.
  • Pitfall: using different weights for treatment and control. This compares means for different covariate compositions. Use the same \(w_x\) in both sums if the intended contrast standardizes both treatment states to one target distribution.
  • Pitfall: calling every adjusted contrast causal. The weighted arithmetic alone cannot establish exchangeability, consistency, or positivity. Describe the computed result as a standardized contrast unless its causal assumptions are defended.

A standardized point estimate also does not communicate sampling uncertainty by itself. Inference requires an appropriate variance calculation that reflects how the data and weights were obtained; do not read precision or statistical significance from the weighted mean alone.

Key takeaway: For each treatment state, multiply every stratum-specific observed mean by the same target-population stratum weight and add. Subtract the two standardized means to obtain the contrast. Its causal interpretation depends on the assumptions, and its target depends on the weights.

Check Your Understanding

Work through the questions, then compare your calculations with the solutions.

  1. A hypothetical target population is 70% in stratum 1 and 30% in stratum 2. Treated means are 5 and 9; control means are 4 and 7. Calculate both standardized means and their contrast.
  2. In a two-stratum table, the stratum-specific treatment-control contrasts are 2 and 6 units. The target weights are 0.80 and 0.20. What is the standardized contrast? Why is the unweighted average not the target-population contrast?
  3. A table has a positive target weight for a stratum but no control participants in that stratum. Can the standardization formula be directly evaluated from the observed cell means? State the issue.
  4. Why might a standardized contrast differ from the crude difference in means, even when the same outcome and participants are used?

Solutions. (1) The treated mean is \((0.70)(5)+(0.30)(9)=3.5+2.7=6.2\). The control mean is \((0.70)(4)+(0.30)(7)=2.8+2.1=4.9\). The contrast is \(6.2-4.9=1.3\) units. (2) The weighted contrast is \((0.80)(2)+(0.20)(6)=1.6+1.2=2.8\) units. The unweighted average, \(4\), gives both strata equal weight rather than using the target population’s 80%/20% composition. (3) No. The control mean for that stratum is not observed, so its weighted contribution cannot be calculated from the table; the target includes a stratum without observed control support. (4) The crude means average over each treatment group’s own stratum composition, while standardization uses a common target composition. If those compositions differ and outcomes vary by stratum, the contrasts can differ.

Clinical Biostats