Why Stratify the Baseline Hazard?
A weighted Cox marginal structural model may need to represent groups with substantially different underlying event rates. For example, disease stage at baseline may define clinically meaningful strata whose hazards have different shapes over time. A single baseline hazard forces those shapes to be the same, up to a constant multiplier. Stratification relaxes that restriction while retaining a shared treatment-effect parameter.
The key modeling choice is that strata have separate baseline hazards, but the coefficient for treatment history is common. This is not the same as estimating a separate treatment effect in every stratum. The weighted Cox risk sets and score must also be formed within strata: an individual in one stratum is not in another stratum’s risk set.
The stratum variable is used to divide baseline hazards, not automatically to adjust for every measured covariate. A causal interpretation still requires the usual conditions for the weighted MSM: consistency, adequate treatment and censoring positivity, and correct adjustment by the weights for the relevant treatment and censoring processes. The weighted representation must yield appropriate treatment-history comparisons within the risk sets. Censoring must be independent of the event process in the weighted analysis, conditional on the modeled information. The shared-effect model is an additional restriction: if treatment effects genuinely differ by stratum, a single \(\beta\) may be inadequate.
Weighted Risk Sets and the Common Score
Let \(N_i(t)\) indicate whether individual \(i\) has experienced the event by time \(t\), and let \(Y_i(t)\) indicate that the individual is at risk just before \(t\). Write \(w_i(t)\) for the analysis weight applying to that individual’s at-risk contribution at \(t\). Assume these weights are positive and are available using information measured by \(t\); they are treated as fixed when differentiating the outcome-model criterion. Let \(R_g(t)=\{i:G_i=g,\;Y_i(t)=1\}\). For \(r=0,1,2\), define $$ S_g^{(r)}(t,\beta)=\sum_{j\in R_g(t)}w_j(t)\exp\{\beta^{\mathsf T}X_j(t)\}X_j(t)^{\otimes r}, $$ where \(X^{\otimes 0}=1\), \(X^{\otimes 1}=X\), and \(X^{\otimes 2}=XX^{\mathsf T}\). $$ The sums are made separately for each stratum. In particular, \(S_g^{(0)}\) is not formed by adding people from other strata.
Suppose event times are distinct. For an event at time \(t_i\), the event individual belongs to stratum \(G_i\). A weighted partial-likelihood criterion, written as a weighted estimating objective, is
Here \(\Delta_i=1\) denotes an observed event. With noninteger weights this is generally a pseudo-likelihood objective, not an ordinary likelihood for independent replicated observations. Its derivative is the weighted Cox score.
To verify the formula, differentiate the criterion event by event. The derivative of \(\beta^{\mathsf T}X_i(t_i)\) is \(X_i(t_i)\). The derivative of \(S_g^{(0)}\) is \(S_g^{(1)}\), so the chain rule gives \(\partial\log S_g^{(0)}/\partial\beta=S_g^{(1)}/S_g^{(0)}\). Multiplication by the event weight and summation gives the displayed score. The estimate solves \(U(\hat\beta)=0\), if a finite solution exists.
Worked Example: Two Strata, One Shared Score
At a particular event time in stratum A, suppose the risk set has two individuals: the event individual has \(X=1\) and weight 2, while the other has \(X=0\) and weight 1. At an event time in stratum B, suppose the event individual has \(X=0\) and weight 1, while the other at risk has \(X=1\) and weight 3. Compute the total score at \(\beta=0\), considering just these two event contributions.
In stratum A, when \(\beta=0\), the weighted risk-set denominator is \(S_A^{(0)}=2+1=3\), and the first-moment sum is \(S_A^{(1)}=2(1)+1(0)=2\). The risk-set mean is \(2/3\), so the event contribution is \(2(1-2/3)=2/3\).
In stratum B, \(S_B^{(0)}=1+3=4\) and \(S_B^{(1)}=1(0)+3(1)=3\). The risk-set mean is \(3/4\), so the event contribution is \(1(0-3/4)=-3/4\). The total is \(2/3-3/4=8/12-9/12=-1/12\). The negative score indicates that, at \(\beta=0\), increasing \(\beta\) would locally decrease this objective’s score; it does not by itself determine the fitted coefficient.
Why the Baseline Hazards Separate
Under the model, individuals in the same stratum have event intensities proportional to \(\exp\{\beta^{\mathsf T}X_i(t)\}\), with the common factor \(\lambda_{0g}(t)\). In an unweighted Cox model, the conditional probability that individual \(i\) is the one to fail at an event time, given one event in stratum \(g\)’s risk set, is proportional to this relative hazard. The common baseline factor cancels:
The cancellation is within a stratum. It does not justify putting members of different strata into one risk-set denominator: if their baseline hazards differ, there is no single common baseline factor to cancel across those groups. Weighting replaces the corresponding risk-set sums by weighted sums and produces the estimating criterion above.
Thus, the model estimates one \(\hat\beta\), then estimates a different cumulative baseline hazard \(\widehat{\Lambda}_{0g}\) for each stratum. The baseline-hazard estimates are not required to be proportional across strata.
Worked Example: Different Baseline Hazards, Shared Hazard Ratio
Suppose there are two strata and a binary treatment \(A\). The shared treatment coefficient is \(\beta=\log(1.5)\). At a particular period, let the baseline hazards be \(\lambda_{01}=0.02\) and \(\lambda_{02}=0.08\) per year. Calculate the hazards for untreated and treated individuals in each stratum, and the survival probabilities over 10 years if these hazards are constant.
Since \(\exp(\beta)=1.5\), the model gives untreated hazards \(0.02\) and \(0.08\), and treated hazards \(0.02(1.5)=0.03\) and \(0.08(1.5)=0.12\) per year. The treatment hazard ratio is \(0.03/0.02=1.5\) in stratum 1 and \(0.12/0.08=1.5\) in stratum 2.
For a constant hazard \(\lambda\), survival through 10 years is \(\exp(-10\lambda)\). The four values are \(\exp(-0.2)\approx0.819\) for untreated stratum 1, \(\exp(-0.3)\approx0.741\) for treated stratum 1, \(\exp(-0.8)\approx0.449\) for untreated stratum 2, and \(\exp(-1.2)\approx0.301\) for treated stratum 2. The different stratum-specific survival levels coexist with the same treatment hazard ratio. The example illustrates the model’s structure; it does not establish that proportional hazards or a shared effect is appropriate for actual data.
Worked Example: Why Risk Sets Must Stay Within Stratum
At an event time in stratum 1, suppose the event individual has treatment \(A=1\), weight 1, and the only other member of that stratum’s risk set has \(A=0\), weight 1. At the same time, stratum 2 has two at-risk individuals, both with \(A=0\), each with weight 10. Find the stratum 1 score contribution at \(\beta=0\), first using the correct risk set and then incorrectly pooling the strata.
Correctly, stratum 1 has \(S_1^{(0)}=1+1=2\), \(S_1^{(1)}=1\), and weighted mean \(1/2\). Its event contribution is \(1(1-1/2)=1/2\).
If the strata are incorrectly pooled, the denominator is \(1+1+10+10=22\), and the first-moment sum remains 1. The pooled mean is \(1/22\), giving the false contribution \(1-1/22=21/22\). The discrepancy occurs because the many stratum 2 individuals have been treated as though their baseline hazard were the same as stratum 1’s. Stratification requires separate risk-set sums, not merely a stratum label added to the data.
Stratification, Interactions, and Alternatives
Stratification allows the baseline hazard to differ freely with \(g\); it does not allow the treatment coefficient to differ with \(g\). A treatment-by-stratum interaction instead models, for example, \(\beta_g=\beta+\gamma_g\), giving a different treatment hazard ratio in each stratum. That extension is useful when effect modification is the target, but it requires estimating more parameters and enough treatment variation and events in each group.
| Approach | Baseline hazard | Treatment effect | Main implication |
|---|---|---|---|
| Common-baseline Cox MSM | One shared baseline hazard | Shared coefficient | More restrictive about how baseline risks vary across strata |
| Stratified Cox MSM | Separate unrestricted baseline hazards | Shared coefficient | Allows stratum-specific hazard shapes while pooling information about the effect |
| Stratified model with interactions | Separate unrestricted baseline hazards | Stratum-specific coefficients | Allows effect modification but estimates more parameters |
The common-baseline model can be more efficient if its baseline restriction is credible, but it can fit poorly when baseline hazards differ. The interaction model is more flexible about treatment effects, but sparse strata can make its estimates unstable or unidentified. Stratification is therefore a substantive choice: it trades a restriction on baseline hazards for a pooling assumption about treatment effects.
Diagnostics and Limitations
Check that each stratum has events and meaningful weighted risk-set support over the periods used to estimate its baseline hazard. Examine the distribution and range of weights within strata; a few very large weights can make the effective risk set much smaller than the raw count suggests. Also inspect whether treatment-history contrasts are represented in the relevant weighted risk sets. If one stratum has little or no weighted overlap, its data may contribute little reliable information about the shared effect.
Assess whether a shared treatment effect is plausible by examining stratum-specific effect patterns as a diagnostic, while recognizing that separate estimates may be imprecise. A systematic pattern of different effects challenges the common-\(\beta\) restriction. The model also retains the proportional-hazards assumption for the treatment effect: stratification does not make \(\beta\) time-varying. Finally, stratifying on many or sparse categories can leave few events per stratum and produce unstable baseline estimates.
A common mistake is to assume that a shared treatment coefficient means a shared baseline hazard. It does not: \(\lambda_{0g}(t)\) is permitted to vary freely across strata. The opposite mistake is to read separate baseline hazards as evidence that the treatment effect has been estimated separately. It has not; the same \(\beta\) applies in every stratum. Another failure is to pool all strata in each weighted denominator and then include stratum indicators elsewhere. That does not reproduce stratification, because a common risk-set denominator does not allow the baseline hazard to cancel separately within each stratum.
Check Your Understanding
Answer each question, then compare your work with the solutions.
- In a stratified weighted Cox MSM, what is shared across strata, and what may vary freely?
- At \(\beta=0\), an event individual in a stratum has \(X=1\) and weight 2. The only other person in that stratum’s risk set has \(X=0\) and weight 2. What is the event’s score contribution?
- Why can individuals from a different stratum not be added to the event individual’s risk-set denominator?
- For an event in stratum \(g\), suppose its event weight is 3 and \(S_g^{(0)}(t,\hat\beta)=12\). What is the weighted Breslow baseline-hazard increment?
Solutions. (1) The coefficient vector \(\beta\), and hence the model’s treatment hazard ratio for a specified contrast, is shared. The baseline hazard \(\lambda_{0g}(t)\) may differ freely by stratum. (2) The risk-set denominator is \(2+2=4\), and its first-moment sum is \(2(1)+2(0)=2\), so the mean is \(1/2\). The contribution is \(2(1-1/2)=1\). (3) The baseline hazard factor cancels only within a stratum. Pooling across strata would mix risk sets with potentially different baseline hazards. (4) The increment is \(3/12=0.25\).