Tutorials › Marginal Structural Models › Estimating Baseline Cumulative Hazard with Weighted Breslow

Fitting MSMs for Survival Outcomes · Tutorial 169 of 501

Estimating Baseline Cumulative Hazard with Weighted Breslow

Learn how fitted linear predictors and aligned weights determine the weighted baseline cumulative hazard at each observed event time.

Advanced 12 min read

What You'll Learn

  • Derive the weighted Breslow increment from the weighted Cox hazard likelihood.
  • Calculate risk-set denominators using fitted linear predictors and weights.
  • Aggregate weighted contributions when events are tied.
  • Show why multiplying every weight by one common constant leaves the estimate unchanged.
  • Diagnose risk-set, weight-alignment, and model failures that can distort the estimate.
  • Distinguish weighted Breslow estimation from ordinary Breslow and the weighted Nelson–Aalen special case.

Why Estimate the Baseline Cumulative Hazard?

A fitted weighted Cox model specifies relative hazards through its linear predictor, but it does not by itself give the baseline cumulative hazard. That baseline component is needed to describe the fitted hazard scale at the reference value of the model covariates. In a marginal structural model, the risk-set contributions are weighted so that the fitted Cox model represents the chosen weighted pseudo-population.

This tutorial derives the weighted Breslow estimator after the weighted Cox fit has supplied \(\hat{\beta}\). The calculation is made at each distinct observed event time: add the weights of the events at that time, then divide by a weighted sum of fitted relative hazards over everyone still at risk.

Definition: Let \(N_i(t)\) count events for person \(i\) by time \(t\), and let \(Y_i(t)\) equal 1 when that person is still under observation and at risk immediately before \(t\), and 0 otherwise. Write \(X_i(t)\) for the model covariates, \(w_i(t)>0\) for the weight aligned to that risk-set time, and \(\eta_i(t)=\hat{\beta}^{T}X_i(t)\) for the fitted linear predictor. At an event time \(t_k\), the weighted Breslow increment is $$ \Delta\widehat{\Lambda}_0(t_k) = \frac{\sum_i w_i(t_k)\,dN_i(t_k)} {\sum_i w_i(t_k)Y_i(t_k)\exp\{\eta_i(t_k)\}}. $$ The weighted Breslow estimator of the baseline cumulative hazard is the sum of these increments through time \(t\): $$ \widehat{\Lambda}_0(t) = \sum_{t_k\leq t}\Delta\widehat{\Lambda}_0(t_k). $$

Here \(dN_i(t_k)=1\) if person \(i\) has an event at \(t_k\), and is 0 otherwise. A tied event time may therefore have several nonzero event indicators. The numerator is the sum of their weights, not simply the number of events. The denominator includes all people at risk immediately before the event time, with each contribution multiplied by its weight and fitted relative hazard.

Deriving the Weighted Breslow Increment

The derivation treats the fitted coefficient vector \(\hat{\beta}\) as fixed. Assume a finite set of observed event times \(t_1,\ldots,t_K\), positive finite weights, and a positive finite weighted risk-set denominator at each event time. Assume also that covariates and weights used at time \(t\) are available just before \(t\), so they are aligned with the risk set rather than determined by the event at \(t\). The derivation is an algebraic maximization of a weighted Cox hazard likelihood; it does not establish that the causal weighting or the Cox model is valid.

Write \(\lambda_k=\Delta\Lambda_0(t_k)\) for the baseline cumulative hazard jump at \(t_k\), and define \(D_k=\sum_i w_i(t_k)dN_i(t_k)\) and \(R_k=\sum_i w_i(t_k)Y_i(t_k)\exp\{\hat{\beta}^{T}X_i(t_k)\}\). For fixed \(\hat{\beta}\), the terms of the weighted log-likelihood that depend on \(\lambda_k\) are \(D_k\log(\lambda_k)-R_k\lambda_k\). The event terms involving covariates do not depend on \(\lambda_k\).

1
Collect weighted events.
At \(t_k\), each observed event contributes its weight to \(D_k\), giving the coefficient of \(\log(\lambda_k)\).
2
Collect weighted exposure.
All people at risk contribute \(w_i(t_k)Y_i(t_k)\exp\{\hat{\beta}^{T}X_i(t_k)\}\) to \(R_k\).
3
Maximize over the jump.
Differentiate \(D_k\log(\lambda_k)-R_k\lambda_k\), set the derivative to zero, and solve for \(\lambda_k\).
Derivation: For \(D_k>0\) and \(R_k>0\), the derivative with respect to \(\lambda_k>0\) is \(D_k/\lambda_k-R_k\). Its unique zero is \(\lambda_k=D_k/R_k\). The second derivative is \(-D_k/\lambda_k^2<0\), so this stationary point is the maximum. Substitution of the definitions of \(D_k\) and \(R_k\) gives the weighted Breslow increment. If there are no events at a time, the likelihood contribution is \(-R_k\lambda_k\), maximized over \(\lambda_k\geq0\) at zero; hence no jump is added at a non-event time. \(\square\)

This derivation explains both parts of the formula: an event is represented in the weighted numerator, while its expected event contribution under the fitted hazard depends on the full weighted risk set in the denominator. With tied events, Breslow’s construction uses the sum of the event weights and one denominator evaluated at that shared time.

Worked Risk-Set Calculations

Worked Example: One Event and a Weighted Risk Set

At time \(t=3\), suppose A, B, C, and D are at risk. Their weights are \(2,1,3,0.5\), respectively, and their fitted relative hazards \(\exp\{\hat{\beta}^{T}X_i(3)\}\) are \(2,1,0.5,1.5\). B is the only person with an event at this time. Calculate the baseline hazard increment.

The weighted event numerator is B’s weight, so it equals \(1\). The risk-set denominator is \(2(2)+1(1)+3(0.5)+0.5(1.5)=4+1+1.5+0.75=7.25\). Therefore, \(\Delta\widehat{\Lambda}_0(3)=1/7.25=4/29\approx0.138\).

B contributes to both numerator and denominator because B is both an event case and at risk just before the event. A, C, and D contribute only to the denominator at this time.

Worked Example: Accumulating Increments Across Event Times

Suppose at \(t_1\), A, B, and C are at risk. Their weighted relative hazards \(w_i\exp\{\hat{\beta}^{T}X_i\}\) are \(1,4,0.5\), and A has the event. At \(t_2\), A has left the risk set; B and C remain, with weighted relative hazards \(4\) and \(0.5\), and C has the event. Find the increments and the cumulative estimate through \(t_2\).

At \(t_1\), the numerator is A’s weight, which is \(1\), and the denominator is \(1+4+0.5=5.5\). Thus the first increment is \(1/5.5=2/11\).

At \(t_2\), the risk set excludes A. C’s event weight is \(1\), while the denominator is \(4+0.5=4.5\). The second increment is \(1/4.5=2/9\). The cumulative estimate is \(2/11+2/9=(18+22)/99=40/99\approx0.404\).

The cumulative estimate is a sum of jumps, not a product. A person who has experienced the event is not included in a later risk set.

Worked Example: Tied Events and Common Weight Rescaling

At a shared event time, three people are at risk. Their weights are \(2,1,3\), and their fitted relative hazards are \(1,2,0.5\). The second and third people have events. Calculate the weighted Breslow increment, then verify that multiplying every weight by 4 leaves it unchanged.

The event numerator is \(1+3=4\). The denominator is \(2(1)+1(2)+3(0.5)=2+2+1.5=5.5\). Hence the increment is \(4/5.5=8/11\approx0.727\).

After multiplying every weight by 4, the event numerator is \(16\) and the denominator is \(8+8+6=22\). The resulting increment is \(16/22=8/11\), as before. This common scaling invariance is useful when weights are normalized, but it does not mean that changing weights differently across people has no effect.

Properties, Assumptions, and Practical Checks

The common rescaling property follows directly from the ratio. If each weight is replaced by \(c\,w_i(t_k)\), for the same constant \(c>0\), both numerator and denominator are multiplied by \(c\). Their ratio is unchanged. In contrast, truncating or otherwise modifying individual weights generally changes the ratio.

Result: At a fixed fitted \(\hat{\beta}\), a common positive rescaling of all weights at every risk-set time leaves every weighted Breslow increment unchanged. Indeed, $$ \frac{\sum_i c w_i(t_k)dN_i(t_k)} {\sum_i c w_i(t_k)Y_i(t_k)\exp\{\eta_i(t_k)\}} = \frac{c\sum_i w_i(t_k)dN_i(t_k)} {c\sum_i w_i(t_k)Y_i(t_k)\exp\{\eta_i(t_k)\}} = \Delta\widehat{\Lambda}_0(t_k). $$ Summing the unchanged increments proves the same invariance for \(\widehat{\Lambda}_0(t)\). \(\square\)

The formula is a finite-sample calculation. Interpreting it as an estimate of a target marginal structural model additionally relies on the assumptions underlying the weighted analysis: the weights must represent the intended intervention or pseudo-population, positivity must be adequate, censoring must be handled appropriately, and the marginal Cox model must be suitably specified. Estimated weights and \(\hat{\beta}\) are plugged into the formula; their estimation uncertainty is not represented by the baseline-hazard calculation itself.

Useful diagnostics focus on the quantities entering the ratio. At each event time, verify the event numerator, the risk-set membership, the time-specific weights, and the fitted linear predictors separately. Check that the denominator is positive and finite, and inspect whether a few large weights dominate either sum. Unexpectedly large jumps can result from a small weighted risk-set denominator, not just from many events. A zero denominator at an observed event time means the calculation is undefined and usually signals a risk-set or weight-alignment error.

ApproachEvent numeratorRisk-set denominatorWhat changes
Weighted BreslowSum of event weightsWeighted fitted relative hazardsUses the fitted Cox linear predictor and weighted risk sets.
Ordinary BreslowNumber of eventsUnweighted fitted relative hazardsIs the corresponding calculation without case weights.
Weighted Nelson–Aalen formSum of event weightsSum of weights in the risk setIs the Breslow expression with relative hazards set to 1, as when \(\beta=0\).

These alternatives answer different calculations. Ordinary Breslow is not a substitute for weighted Breslow when the target analysis uses nonconstant weights. The weighted Nelson–Aalen form omits covariate-specific relative hazards and therefore is not the general baseline estimator from a fitted weighted Cox model. Tie handling also matters: the formula here is the Breslow tied-event convention, which uses one denominator for all events at a tied time; it should not be silently replaced by another tie approximation.

Common Mistakes and Limitations

  • Counting events instead of summing their weights. In the tied example, the numerator is \(1+3=4\), not 2. The event count is correct only when every event weight equals 1.
  • Forgetting the fitted relative hazard. The denominator is not merely the total risk-set weight. Each risk-set weight is multiplied by \(\exp\{\hat{\beta}^{T}X_i(t)\}\).
  • Using the event weight for everyone in the risk set. Each person contributes their own aligned weight and predictor to the denominator.
  • Including someone after their event or after leaving observation. Risk-set membership is determined immediately before the event time.
  • Treating scaling invariance as robustness to weight changes. Only one common positive multiplier cancels; person-specific changes, including truncation, generally alter the estimator.

Finally, \(\widehat{\Lambda}_0(t)\) is a step-function estimate of cumulative baseline hazard, not itself a survival probability. Its causal interpretation is not guaranteed by using weights, and its uncertainty requires attention to estimation of both the Cox coefficients and the weights. The calculation also inherits the chosen model specification and the Breslow convention for ties.

Check Your Understanding

Answer each question, then compare your work with the solutions below.

  1. At an event time, two people have weights 2 and 1 and relative hazards 1 and 3. Both are at risk, and only the person with weight 2 has the event. What is the weighted Breslow increment?
  2. At one tied event time, three people have event weights 0.5, 1, and 2. What is the numerator?
  3. Why does multiplying every weight by 10 leave the estimate unchanged, while doubling only one person’s weight generally does not?
  4. Name two checks that could reveal a risk-set or weight-alignment error.

Solutions. (1) The numerator is 2 and the denominator is \(2(1)+1(3)=5\), so the increment is \(2/5=0.4\). (2) The numerator is \(0.5+1+2=3.5\). (3) A common factor multiplies numerator and denominator equally and cancels; changing only one person’s weight changes their relative contribution to one or both sums. (4) Check that every event case is in the risk set immediately before its event, and that the correct time-specific weight and fitted predictor are used for every risk-set member. Also check that the event-time denominator is positive and finite.

Clinical Biostats