Why Compare Statin Effects by Baseline Age?
A statin may have different cardiovascular effects at different baseline ages. But comparing treated and untreated patients separately within age groups does not automatically answer whether the effect varies with age: treatment selection may also differ by age and by other prognostic characteristics. In one age group, for example, patients with more severe disease may be more likely to receive a statin; in another, the treatment pattern may be reversed.
The goal here is to estimate treatment contrasts on a clearly specified scale while adjusting for measured baseline confounding. Let \(A\) indicate statin initiation at baseline, with \(A=1\) for initiation and \(A=0\) otherwise. Let \(Y\) indicate a cardiovascular event by a fixed follow-up horizon, and let \(Y^a\) be the event outcome that would occur under treatment level \(a\). Write \(V\) for baseline age and \(C\) for other measured baseline confounders, so that \(L=(V,C)\). The target is the risk difference at age \(v\), \(E[Y^1\mid V=v]-E[Y^0\mid V=v]\).
A treatment-by-age marginal structural model (MSM) represents these potential-outcome risks as functions of treatment and age in a weighted pseudo-population. For age bands, a saturated model can estimate a separate risk under each treatment level in each band. For continuous age, a chosen model can represent risk variation and treatment-effect variation across age. The interaction has meaning only relative to the outcome scale and model: an interaction in risk differences need not imply an interaction on the risk-ratio or odds-ratio scale.
Identification and Weighting
Assume consistency: for a person who receives \(A=a\), the observed outcome equals \(Y^a\). Assume conditional exchangeability, \(Y^a\perp A\mid L\), for \(a=0,1\), and positivity: \(0<P(A=a\mid L=l)\) for covariate values in the target population. Also assume no interference between individuals. These conditions, together with well-defined treatment strategies and outcome measurement, allow the observed data to identify the age-specific risks. Exchangeability is an assumption about measured covariates; it does not rule out unmeasured confounding.
Define \(e_a(L)=P(A=a\mid L)\), where \(e_1(L)=P(A=1\mid L)\) and \(e_0(L)=1-e_1(L)\). Inverse-probability weighting gives each observed person a weight \(1/e_A(L)\). Stabilized weights may multiply this by a numerator probability, such as \(P(A\mid V)\). Within a fixed age \(v\), that numerator is constant for each treatment group and cancels in a weighted group mean. The denominator must account for the measured confounders that influence treatment.
Proof. Conditional on \(L\), exchangeability gives \(E[Y^a\mid A=a,L]=E[Y^a\mid L]\). By consistency, when \(A=a\), \(Y=Y^a\). Thus $$ E\left[\frac{I(A=a)Y}{e_a(L)}\middle|L\right] =\frac{P(A=a\mid L)E[Y\mid A=a,L]}{e_a(L)} =E[Y^a\mid L]. $$ Taking conditional expectation given \(V=v\) yields the first identity by iterated expectation. For the denominator, $$ E\left[\frac{I(A=a)}{e_a(L)}\middle|L\right] =\frac{P(A=a\mid L)}{e_a(L)}=1, $$ so conditioning on \(V=v\) also gives 1. The ratio therefore equals \(E[Y^a\mid V=v]\). \(\square\)
In a sample, the corresponding age-specific weighted risk is estimated by $$ \widehat{\mu}_a(v)= \frac{\sum_{i=1}^{n}I(A_i=a)I(V_i=v)Y_i/e_a(L_i)} {\sum_{i=1}^{n}I(A_i=a)I(V_i=v)/e_a(L_i)} $$ for a discrete age group \(v\). The estimated risk difference is \(\widehat{\Delta}(v)=\widehat{\mu}_1(v)-\widehat{\mu}_0(v)\). With continuous age, a weighted outcome model can estimate the conditional risks; its functional form then matters. A weighted regression is not automatically a marginal risk model merely because weights were used.
Worked Example: Age-Band Risks and an Interaction
Worked Example: Age-Band Risks and an Interaction
Suppose baseline treatment weights have been used to estimate the following risks by age band. The entries are weighted risks, not unadjusted proportions.
| Baseline age | Risk without statin | Risk with statin | Risk difference, statin minus no statin |
|---|---|---|---|
| Under 65 | 0.12 | 0.08 | 0.08 − 0.12 = −0.04 |
| 65 or older | 0.24 | 0.15 | 0.15 − 0.24 = −0.09 |
For people under 65, the estimated risk difference is \(-0.04\), a 4-percentage-point lower risk under statin initiation. For people aged 65 or older, it is \(-0.09\), a 9-percentage-point lower risk. The difference between these two treatment contrasts is \(-0.09-(-0.04)=-0.05\), or 5 percentage points more risk reduction in the older band on the risk-difference scale.
If \(G=1\) denotes age 65 or older and \(G=0\) denotes under 65, a saturated identity-link model for risk can be written as \(E[Y\mid A,G]=\beta_0+\beta_A A+\beta_G G+\beta_{AG}AG\). The younger-band contrast is \(\beta_A=-0.04\). The older-band contrast is \(\beta_A+\beta_{AG}=-0.09\), so \(\beta_{AG}=-0.05\). This is effect modification on the additive risk scale, assuming the weighted risks identify the target risks and the model represents them correctly.
Worked Example: Confounding That Differs by Age
Worked Example: Confounding That Differs by Age
Let \(U\) be a binary baseline severity factor, with high and low severity equally common within each age band. Suppose cardiovascular risks are 0.20 for high severity and 0.02 for low severity, regardless of statin treatment. Thus, by construction, statins have no effect within either severity category or age band. However, treatment selection differs: among younger people, 80% of statin initiators but 20% of non-initiators have high severity. Among older people, those percentages are reversed.
For younger people, the unweighted treated risk is \(0.80(0.20)+0.20(0.02)=0.164\). The unweighted untreated risk is \(0.20(0.20)+0.80(0.02)=0.056\). The apparent risk difference is \(0.164-0.056=0.108\), suggesting harm even though treatment has no effect. For older people, the treated risk is \(0.20(0.20)+0.80(0.02)=0.056\), while the untreated risk is \(0.80(0.20)+0.20(0.02)=0.164\). The apparent difference is \(-0.108\), now suggesting benefit.
Weighting to balance severity within each age band restores the 50:50 severity mix in both treatment groups. The risk under either treatment level becomes \(0.50(0.20)+0.50(0.02)=0.11\). The adjusted risk difference is \(0.11-0.11=0\) in each age band. The reversal in the unweighted contrasts was subgroup-specific confounding, not evidence of genuine age modification. This conclusion depends on measuring \(U\), correctly modeling treatment probabilities, and having both treatment levels represented at each severity level.
Worked Example: A Continuous-Age Risk Model
Worked Example: A Continuous-Age Risk Model
Consider the weighted risk model \(E[Y^a\mid V=v]=0.20+0.001(v-50)-0.04a-0.001a(v-50)\), for ages from 50 to 70. Its treatment contrast is $$ \Delta(v)=-0.04-0.001(v-50). $$ At age 50, the no-statin risk is \(0.20\), and the statin risk is \(0.20-0.04=0.16\); the difference is \(-0.04\). At age 70, the no-statin risk is \(0.20+0.001(20)=0.22\). The statin risk is \(0.22-0.04-0.001(20)=0.16\), giving a difference of \(-0.06\).
The interaction coefficient is \(-0.001\): for each additional year of age, the modeled risk difference decreases by 0.001, or 0.1 percentage point. The risks in this example range from 0.16 to 0.22, so they remain between zero and one over the stated age interval. The model should not be extrapolated beyond an interval where its predicted risks remain meaningful or where data support the age pattern.
Interpreting the Model and Checking Its Limits
A formal interaction coefficient is tied to the chosen model and scale. For a linear risk model, $$ E[Y^a\mid V=v]=\beta_0+\beta_V(v-v_0)+\beta_Aa+\beta_{AV}a(v-v_0), $$ the age-specific risk difference is \(\Delta(v)=\beta_A+\beta_{AV}(v-v_0)\). Therefore, for two ages \(v_1\) and \(v_0\), \(\Delta(v_1)-\Delta(v_0)=\beta_{AV}(v_1-v_0)\). This follows by subtracting the treatment contrast at \(v_0\) from the contrast at \(v_1\); the baseline risk terms cancel. Thus \(\beta_{AV}\) describes how the risk difference changes per age unit under this model, not a universal measure of biological interaction.
Useful checks include examining whether treatment probabilities are plausibly estimated across the age and confounder patterns, whether both treatment groups occur in each target age range, and whether weighted covariate distributions are more comparable within age. Large or highly variable weights and sparse age-by-treatment cells signal that the estimates may be unstable or driven by limited overlap. These checks do not establish exchangeability or prove the weight model correct. Unmeasured confounding remains possible.
Alternative approaches answer related questions. Direct stratification can estimate risks within age groups and confounder strata, then standardize over the desired confounder distribution; it can become cumbersome with many covariates. Outcome regression or the parametric g-formula models outcome risks given treatment and covariates and then averages predictions over the target covariate distribution. Weighting instead creates a pseudo-population in which measured treatment predictors are balanced in expectation. Both approaches rely on modeling and causal assumptions; comparing them can reveal sensitivity to modeling choices. A conditional logistic regression coefficient is not automatically an age-specific marginal risk difference, and odds-ratio interaction is not interchangeable with risk-difference interaction.
Finally, age-specific estimates are descriptive of causal contrasts only under the stated assumptions, and uncertainty may be substantial in narrow age bands. A difference between two point estimates does not by itself establish effect modification; uncertainty in the contrast difference matters. The target population should also be explicit: the risk difference at age \(v\) averages over the covariate distribution at that age, so it can change if that distribution differs across populations even when conditional treatment effects are similar.
Common Pitfalls
- Calling crude subgroup contrasts causal. Stratifying by age alone does not control confounding by other baseline characteristics. Use an adjustment strategy that addresses those confounders.
- Calling every subgroup difference effect modification. Different unweighted contrasts may arise from different confounding patterns, as the severity example shows. Compare appropriately adjusted contrasts on a stated scale.
- Interpreting an interaction without naming its scale. A treatment-by-age term in a risk model concerns risk differences; a term in a logistic model concerns log odds. These are different estimands.
- Assuming weighting fixes all bias. Weighting cannot remove unmeasured confounding, repair a misspecified propensity model, or create treatment overlap where none exists.
Check Your Understanding
Answer each question, then compare with the solutions below.
- In a weighted age band, the estimated risks are 0.18 without statin and 0.13 with statin. What is the risk difference, and how should its sign be interpreted?
- If the risk difference is \(-0.03\) at age 50 and \(-0.07\) at age 70, what is the change in risk difference per decade under a linear age interaction?
- Why can unweighted treated-versus-untreated comparisons within age bands still be confounded?
- Name two assumptions needed to interpret the weighted age-specific risks causally, and state one limitation of weighting.
Solutions. (1) The risk difference is \(0.13-0.18=-0.05\), a 5-percentage-point lower estimated risk with statin initiation. (2) The contrast changes by \(-0.07-(-0.03)=-0.04\) over 20 years, or \(-0.02\) per decade. (3) Other prognostic factors can still differ between treated and untreated people within an age band and influence both treatment and outcome. (4) Examples include consistency, conditional exchangeability, and positivity. Weighting cannot address unmeasured confounding and depends on adequate estimation of treatment probabilities.