Tutorials › Competing Risks and Multi-State Models › WLW Marginal Model

Recurrent-Event Estimands and Models · Tutorial 585 of 699

WLW Marginal Model

Learn to specify event-order-specific marginal Cox models, identify who enters each WLW risk set, and distinguish order-specific effects from a pooled model with common effects.

Advanced 13 min read

What You'll Learn

  • Define a separate time-to-event outcome for each recurrence order
  • Specify event-order-specific baseline hazards and covariate effects
  • Explain why each event-order risk set begins at study entry
  • Derive the event-order partial likelihood contribution
  • Check censoring and proportional-hazards assumptions for the marginal outcomes
  • Distinguish separate fits from pooled stratified models with and without interactions

Why Model Event Orders as Marginal Outcomes?

A recurrent-event analysis can ask how covariates relate to the first event, the second event, and later events. The Wei-Lin-Weissfeld (WLW) approach treats each event order as a separate time-to-event outcome. Its defining feature is that a subject enters the risk set for each order at study entry, not only after experiencing the previous event. This makes WLW a marginal event-order model rather than a model conditional on having reached the preceding event.

That distinction matters. A second-event hazard in WLW is defined among subjects who have not yet experienced their second event, including subjects who have not yet experienced a first event. The model does not restrict the second-event analysis to people who have already had a first event. This differs from the conditional risk-set logic of the PWP models.

Definition: Let \(T_{ik}\) be the time from a common study-entry origin to subject \(i\)'s \(k\)th event, for event order \(k=1,\ldots,K\). The WLW marginal Cox model specifies, for each order \(k\), a hazard $$ \lambda_{ik}(t\mid Z_i,\ T_{ik}\ge t) = \lambda_{0k}(t)\exp(\beta_k^\top Z_i). $$ Here \(Z_i\) is the subject's covariate vector, \(\lambda_{0k}(t)\) is an order-specific baseline hazard, and \(\beta_k\) is an order-specific covariate-effect vector. The hazard is for the \(k\)th event time and does not condition on the subject's earlier event history.

The times \(T_{i1},T_{i2},\ldots\) are ordered when the corresponding events occur, but a subject may not experience every event order during follow-up. If follow-up ends at censoring time \(C_i\), the observed time and event indicator for order \(k\) are \(X_{ik}=\min(T_{ik},C_i)\) and \(\Delta_{ik}=I(T_{ik}\le C_i)\). A subject who has not experienced event \(k\) by \(C_i\) contributes a right-censored observation for that order.

Each order can have its own \(\beta_k\), as well as its own baseline hazard. Alternatively, an analyst may impose a common coefficient vector across orders. These are different model specifications: equality of the baseline hazards is not required for equality of the covariate effects, and the standard order-specific model does not impose that equality.

Risk-Set Meaning and Model Assumptions

For the \(k\)th marginal outcome, the observed risk indicator at time \(t\) is \(Y_{ik}(t)=I(X_{ik}\ge t)\). Thus subject \(i\) is in the order-\(k\) risk set at \(t\) if the subject is still observed and has not yet experienced event \(k\). The risk set begins at study entry for that order. For example, a subject with no first event by time \(t\) is still at risk for the second-event outcome in the WLW construction, provided the subject remains under observation.

This is a modeling definition, not a claim that the subject can physically experience a second event before a first one. The endpoint \(T_{ik}\) refers to the calendar time of the \(k\)th event, if it occurs; for a subject who never reaches that order during follow-up, it is censored. The approach uses the marginal distribution of each event-order time while allowing event-order outcomes from the same subject to be dependent.

The main assumptions for the usual Cox specification are:

  • Correct event and censoring records. Event order, event times, entry times, and censoring times must be recorded consistently. The formulation above assumes a common study-entry origin; delayed entry requires the risk indicator to reflect actual entry.
  • Proportional hazards within each order. For each \(k\), the covariate hazard ratio is constant over the modeled time scale: the covariate effect is \(\exp(\beta_k^\top Z_i)\), not a function of \(t\).
  • Conditionally non-informative censoring. Given the modeled covariates, censoring must not convey additional information about the unobserved \(k\)th event time. This condition is needed for each order-specific endpoint.
  • Independent subjects. Different subjects are assumed independent. Outcomes across orders for one subject need not be independent; that within-subject dependence matters for variance calculations.
  • A suitable covariate specification. The included covariates and functional forms must adequately represent the order-specific marginal hazards. A time-varying effect or omitted predictor can invalidate the stated Cox model.

The model can be fitted separately for each order, producing a separate Cox fit and coefficient vector for each. The event-order partial likelihoods can also be combined, but repeated outcomes from a subject are not independent observations. The product is then a composite likelihood for marginal models, not a claim that all order-specific records are mutually independent. Variance estimation must account for within-subject dependence; the point here is the model specification, not a particular variance correction.

Partial Likelihood for One Event Order

For event order \(k\), let \(R_k(t)\) denote the subjects with \(Y_{ik}(t)=1\). Suppose subject \(i\) experiences the \(k\)th event at time \(t\). Under the proportional-hazards model, the event hazard for \(i\) is proportional to \(\exp(\beta_k^\top Z_i)\). Conditional on one event occurring at that time among the members of the risk set, the model assigns subject \(i\) the probability

$$ \frac{\exp(\beta_k^\top Z_i)} {\sum_{j\in R_k(t)}\exp(\beta_k^\top Z_j)}. $$

The common baseline hazard cancels from this conditional probability. Multiplying these probabilities over observed events of order \(k\) gives the Cox partial likelihood for that order (with an appropriate standard tie method if event times are tied). This construction depends on the order-specific risk sets and the order-specific coefficient vector.

Model distinction: Separate order-specific Cox fits permit different \(\beta_k\). A pooled model stratified by event order gives each order its own baseline hazard, but without order-by-covariate interactions it constrains the covariate coefficients to be common. To permit order-specific effects in a pooled stratified fit, include event-order-specific covariate effects, such as order-by-covariate interactions.

Worked Specifications and Calculations

Worked Example: Writing the Marginal Model for Two Event Orders

Suppose a hypothetical study follows 120 participants for up to 18 months and records recurrent episodes. Let \(Z_i=1\) indicate exposure to a baseline treatment and \(Z_i=0\) indicate the comparison group. Specify a WLW model for the first and second episodes.

For the first episode, write \(\lambda_{i1}(t\mid Z_i,T_{i1}\ge t)=\lambda_{01}(t)\exp(\beta_1 Z_i)\). For the second, write \(\lambda_{i2}(t\mid Z_i,T_{i2}\ge t)=\lambda_{02}(t)\exp(\beta_2 Z_i)\). The baseline hazards \(\lambda_{01}\) and \(\lambda_{02}\) may differ, and the coefficients \(\beta_1\) and \(\beta_2\) may also differ.

At month 6, a participant with no episode yet can remain in the second-order risk set if still followed and not censored: that participant's second episode has not occurred. This follows the WLW risk-set definition, which starts the second-order outcome at study entry. It does not imply that a second episode has occurred or that the participant has satisfied a first-episode condition.

The specifications are marginal models for each order. They do not include prior episode count or time since the preceding episode as a conditioning variable. If the scientific target is instead an effect among participants who have already experienced the previous episode, a conditional PWP model expresses a different estimand and uses different risk-set logic.

Worked Example: An Order-Specific Partial-Likelihood Contribution

Consider a hypothetical second-event analysis at month 5. The order-2 risk set contains three participants, with treatment indicators \(Z=1,0,1\); the first treated participant experiences a second event at month 5. Suppose the fitted order-2 coefficient is \(\beta_2=\log(2)\). Calculate this event's partial-likelihood contribution.

The contribution is the event participant's relative hazard divided by the sum of relative hazards in the order-2 risk set:

$$ \frac{\exp(\beta_2 Z_i)} {\sum_{j\in R_2(5)}\exp(\beta_2 Z_j)} = \frac{\exp(\log(2)\cdot 1)} {\exp(\log(2)\cdot 1)+\exp(\log(2)\cdot 0)+\exp(\log(2)\cdot 1)} = \frac{2}{2+1+2} = 0.400. $$

The risk set here is defined for the second-event outcome: each included person remains observed and has not had a second event by month 5. It can include someone who has not yet had a first event. The value 0.400 is the model-based conditional contribution for this event time, given the risk set; it is not the probability that a participant has a second event by month 5.

Worked Example: Separate Effects Versus a Common-Effect Model

Suppose a hypothetical analysis estimates a treatment coefficient of \(\hat{\beta}_1=\log(1.4)=0.3365\) for the first event and \(\hat{\beta}_2=\log(0.8)=-0.2231\) for the second. The order-specific fitted hazard ratios are \(\exp(\hat{\beta}_1)=1.4\) and \(\exp(\hat{\beta}_2)=0.8\).

These estimates describe different modeled associations by event order: the first-order hazard ratio is 1.4, while the second-order hazard ratio is 0.8. A pooled stratified Cox model with treatment as its sole covariate but no treatment-by-order interaction would instead impose one common coefficient \(\beta\) for both orders, even though it allows separate baseline hazards. It therefore cannot represent these two distinct coefficients as separate model parameters.

To allow distinct treatment effects in a pooled stratified fit, represent treatment effects separately by event order, for example with treatment-by-order interaction terms. Alternatively, fit the event orders separately. The choice depends on whether a common effect is scientifically intended; it is not determined merely by stratifying the baseline hazard.

Derivation and Practical Checks

The partial-likelihood expression follows directly from the hazard specification. At a fixed time \(t\) for event order \(k\), each at-risk subject \(j\) has hazard \(\lambda_{0k}(t)\exp(\beta_k^\top Z_j)\). Conditional on an event at \(t\) being from one member of \(R_k(t)\), the probability that it is subject \(i\) is its hazard divided by the sum of the risk-set hazards:

$$ \frac{\lambda_{0k}(t)\exp(\beta_k^\top Z_i)} {\sum_{j\in R_k(t)}\lambda_{0k}(t)\exp(\beta_k^\top Z_j)} = \frac{\exp(\beta_k^\top Z_i)} {\sum_{j\in R_k(t)}\exp(\beta_k^\top Z_j)}. $$

The cancellation is valid because every subject in this order-specific risk set shares the same baseline hazard at that time. Repeating the conditional argument across event times yields the partial likelihood. The derivation is order-specific: the risk set and coefficient vector are \(R_k(t)\) and \(\beta_k\). Combining orders without interactions changes the coefficient restrictions, even when baseline hazards are stratified.

Useful diagnostics begin with the data structure. Check that each subject has one correctly ordered event time for each order observed, and that censoring is represented consistently across the order-specific outcomes. Compare the constructed risk sets with the study-entry rule: for WLW, a subject not yet at order \(k\) is not automatically excluded from that order's risk set. Then assess proportional hazards separately by event order using suitable residual-based diagnostics or time-by-covariate checks. A pattern that differs by order may be hidden if only a pooled common-effect model is examined.

Also ask whether censoring is plausibly non-informative conditional on the covariates for each marginal endpoint. If participants with worsening health are more likely to leave follow-up, the observed censoring may carry information about their unobserved event times. A correctly written Cox formula alone does not resolve that problem. Tied event times require an explicit tie-handling convention, and small numbers of events at later orders can make order-specific estimates imprecise.

When WLW Is Useful—and Where It Can Mislead

WLW is useful when the target is a comparison of event-order-specific marginal hazards from a common study-entry time origin, and when the analyst wants to retain subjects in each order-specific risk set from entry. Its structure can use information from participants who do not reach every event order, while keeping the estimand tied to each marginal event-order outcome.

The model is not interchangeable with Andersen-Gill or PWP models. Andersen-Gill models a recurrent-event counting process with its own risk-set and intensity interpretation; PWP models condition on reaching the preceding event order. WLW instead models each event-order time marginally with a risk set beginning at entry. None is universally preferable: the appropriate model follows the scientific question and its target estimand.

A central limitation is that an order-specific marginal model does not describe the joint event history by itself. Separate marginal hazards do not specify the dependence between a participant's first and later event times. Moreover, later-order outcomes may be sparse, and a fitted marginal contrast should not be interpreted as a causal effect without the additional design and causal assumptions required for that conclusion.

Common pitfall: “I stratified the Cox model by event order, so it estimates a different covariate coefficient for each order.” This is incorrect if the model has no order-by-covariate interactions. Stratification permits different baseline hazards; it does not by itself permit different slopes. Use separate fits or include order-specific covariate effects when the model requires distinct \(\beta_k\).

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. Under WLW, does a subject who has not yet experienced a first event enter the second-event risk set at study entry, assuming the subject is observed and has not had a second event?
  2. Write the WLW hazard for event order \(k\) and identify which parameters can vary by order.
  3. A pooled Cox model is stratified by event order and has one treatment coefficient but no interaction. Does it permit order-specific treatment coefficients?
  4. For an event participant with \(Z=0\), suppose \(\beta_k=\log(3)\) and the risk set has covariates \(Z=0,1\). Calculate the partial-likelihood contribution for that event.

Solutions. (1) Yes. The WLW risk set for the second-event outcome begins at study entry; membership requires continued observation and no second event yet, not a previous first event. (2) The hazard is \(\lambda_{ik}(t\mid Z_i,T_{ik}\ge t)=\lambda_{0k}(t)\exp(\beta_k^\top Z_i)\). Both the baseline hazard \(\lambda_{0k}\) and coefficient vector \(\beta_k\) may vary by order. (3) No. It gives order-specific baseline hazards but imposes a common treatment coefficient unless order-by-treatment interactions are included. (4) The contribution is \(1/(1+3)=0.250\), because the event subject has relative hazard \(\exp(\log(3)\cdot0)=1\), and the other at-risk subject has relative hazard \(\exp(\log(3)\cdot1)=3\).

Clinical Biostats