Tutorials › Competing Risks and Multi-State Models › WLW Analysis Of Ordered Recurrences

Recurrent-Event Estimands and Models · Tutorial 589 of 699

WLW Analysis Of Ordered Recurrences

Work through an ordered-recurrence WLW analysis, from constructing one outcome record per subject and event order to interpreting event-specific estimates with robust uncertainty.

Advanced 11 min read

What You'll Learn

  • Define the WLW endpoint and risk set separately for each recurrence order.
  • Construct event-time and censoring records from hypothetical subject histories.
  • Specify event-order-specific marginal proportional hazards models.
  • Interpret event-specific hazard ratios and robust confidence intervals in context.
  • Explain why subject-clustered sandwich uncertainty is needed for repeated records.
  • Compare event-order estimates using their robust covariance, not separate confidence intervals.
  • Identify censoring, model-fit, and inference limitations that affect conclusions.

From Event Histories to WLW Outcome Records

A recurrent-event history is a sequence of event times for each person, often followed by a censoring time. A WLW analysis turns that history into a separate time-to-event outcome for each event order under study. For example, the first, second, and third recurrence each define their own endpoint. The analysis then estimates event-order-specific marginal hazard associations. Its practical details matter: records from the same person are dependent, and an event-order record is not restricted to people who have already experienced the preceding event.

Definition: Let \(T_{ik}\) be the time from the common time origin to person \(i\)'s \(k\)th recurrence, if it occurs during observation, and let \(C_i\) be that person's censoring time. For event order \(k\), the observed time is \(Y_{ik}=\min(T_{ik},C_i)\), and the event indicator is \(\Delta_{ik}=1\) if \(T_{ik}\le C_i\), and 0 otherwise. A WLW analysis uses one such outcome record per person and event order. Its marginal risk set for order \(k\) at time \(t\) consists of all people whose order-\(k\) outcome has not yet occurred or been censored by \(t\), including people who have not yet experienced earlier recurrences.

This construction presumes a shared time origin for the event-order outcomes, such as study entry. The event times must be ordered within a person; event \(k\) cannot occur before event \(k-1\). If the study stops before a person's \(k\)th recurrence, that order's record is censored at the person's observed follow-up end. It is not coded as an event at that time. The same person's records for different event orders may therefore have different observed times and event indicators.

Worked Example: Constructing Records for Three Event Orders

Consider four hypothetical participants. The entries below give a binary covariate \(X\), follow-up end in months, and observed recurrence times in months. Assume follow-up end is the censoring time when the specified recurrence has not occurred. Construct records for the first three event orders.

Person\(X\)Follow-up endObserved recurrence times
A1102, 6, 9
B083, 7
C154
D091, 5, 8

For person A, each of the first three recurrences occurred before month 10, so the records are \((Y_{A1},\Delta_{A1})=(2,1)\), \((Y_{A2},\Delta_{A2})=(6,1)\), and \((Y_{A3},\Delta_{A3})=(9,1)\). For person B, the first and second events occurred at months 3 and 7, but no third event was observed by month 8. The three records are \((3,1)\), \((7,1)\), and \((8,0)\). For person C, only the first event occurred, at month 4; the second- and third-order records are both \((5,0)\). For person D, the first three events occurred at months 1, 5, and 8, so all three records have event indicator 1.

Every person contributes a record to every order being analyzed, even if that person has not reached that order during follow-up. At month 2, for instance, person C is part of the second-order risk set: the second event has not been observed or censored yet. This is a defining feature of the WLW marginal risk-set construction.

Event-Specific Marginal Cox Models

For covariate vector \(X_i\), the usual event-specific WLW model is

$$ \lambda_{ik}(t\mid X_i)=\lambda_{0k}(t)\exp(\beta_k^{\mathsf T}X_i),\qquad k=1,\ldots,K. $$

Here \(\lambda_{ik}(t\mid X_i)\) is the hazard for the \(k\)th event-time endpoint at time \(t\), \(\lambda_{0k}(t)\) is an order-specific baseline hazard, and \(\beta_k\) is the order-specific covariate coefficient vector. The model is marginal in the sense that it models the association between covariates and each ordered event time without conditioning the event-\(k\) coefficient on a specified prior event history. For a binary covariate, \(\exp(\beta_k)\) is the hazard ratio for the \(k\)th event-time endpoint comparing \(X=1\) with \(X=0\), under this model.

The proportional-hazards form requires the covariate hazard ratio for a given order to be constant over the modeled time scale. The order-specific baseline hazards may differ freely. The usual Cox partial likelihood is formed within each event order; schematically, for event-order \(k\), an event at time \(t\) contributes the factor

$$ \frac{\exp(\beta_k^{\mathsf T}X_i)} {\sum_{j:Y_{jk}\ge t}\exp(\beta_k^{\mathsf T}X_j)}. $$

The denominator uses the marginal order-\(k\) risk set. If fitting a stacked model, event order is represented by strata for separate baseline hazards, with covariate-by-order terms if coefficients are to differ by order. The records must remain linked to their original participant identifiers for robust inference.

Assumptions for interpretation: The event-order outcome and time origin are defined consistently; censoring is independent of the future order-\(k\) event time conditional on modeled covariates (or otherwise handled by an appropriate design or method); and the specified proportional-hazards relationship is adequate for each order. The Cox risk sets and covariate data must be correctly constructed. Robust variance estimation allows within-person dependence among the repeated records, but it does not correct informative censoring, confounding, or a misspecified hazard relationship.

Robust Uncertainty for Repeated Records

Treating all person-by-order records as independent generally gives an incorrect variance estimate because the records from one person share characteristics and event history. The WLW point estimates can be obtained from the order-specific partial likelihoods, while the uncertainty is estimated with a sandwich variance clustered by person. In outline, let \(U_i(\beta)\) be the combined score contribution from person \(i\)'s records, and let \(A\) denote the observed information (the negative derivative of the score). A cluster sandwich covariance has the form

$$ \widehat{\operatorname{Var}}(\hat{\beta}) =A^{-1}\left\{\sum_{i=1}^{n}U_i(\hat{\beta})U_i(\hat{\beta})^{\mathsf T}\right\}A^{-1}. $$

Each person's score is combined across that person's event-order records before the outer products are summed. This preserves the cross-order dependence when estimating uncertainty. The sandwich is an asymptotic procedure: with few independent people or few informative events, its standard errors and Wald intervals may be unreliable even if the calculation is implemented correctly.

Worked Example: Interpreting an Event-Specific Estimate

Suppose a hypothetical WLW analysis of a binary treatment reports a first-event-order coefficient of \(\hat{\beta}_1=0.36\), with participant-clustered robust standard error \(SE=0.16\). Assume treatment is coded \(X=1\) and comparison is \(X=0\), and the proportional-hazards model is considered adequate for this order.

The estimated hazard ratio is

$$ \exp(\hat{\beta}_1)=\exp(0.36)=1.433. $$

Thus, under the fitted model, the estimated hazard of the first-event-time endpoint is 1.433 times as high for the treatment group as for the comparison group. This is a hazard comparison, not a ratio of event probabilities or a causal effect.

A two-sided 95% Wald interval on the log-hazard-ratio scale is

$$ 0.36\pm1.96(0.16)=[0.0464,\,0.6736]. $$

Exponentiating both endpoints gives

$$ [\exp(0.0464),\exp(0.6736)]=[1.047,\,1.961]. $$

The estimated first-event hazard ratio is 1.433, with a 95% confidence interval from 1.047 to 1.961. Under the model and large-sample approximation, the interval procedure has 95% coverage over repeated samples. The Wald statistic is \(z=0.36/0.16=2.25\), giving a two-sided \(p\)-value of about 0.0244. At a 0.05 significance level, this is evidence against a zero first-order log-hazard coefficient. The calculation does not establish that treatment caused the difference.

Comparing Orders and Checking the Analysis

Event-order-specific estimates should be read as separate marginal associations for the ordered event-time endpoints. They may differ in size or direction. A difference between estimates is not established merely because one confidence interval excludes 1 and another includes 1. A direct comparison requires the covariance between the estimates, which the person-clustered sandwich can provide when the models are fitted jointly or their covariance is otherwise retained.

Worked Example: Testing a Difference Between Event Orders

Suppose a hypothetical joint WLW fit estimates a treatment coefficient of \(0.36\) for order 1 and \(0.10\) for order 2. Their robust standard errors are \(0.16\) and \(0.20\), and their robust covariance is \(0.012\). Test the descriptive null hypothesis that the two log-hazard coefficients are equal.

The estimated difference is \(0.36-0.10=0.26\). Its estimated variance must include the covariance:

$$ \widehat{\operatorname{Var}}(\hat{\beta}_1-\hat{\beta}_2) =0.16^2+0.20^2-2(0.012) =0.0256+0.0400-0.0240 =0.0416. $$

The standard error of the difference is \(\sqrt{0.0416}=0.2040\), so the Wald statistic is \(0.26/0.2040=1.275\), with two-sided \(p\)-value approximately 0.202. These hypothetical estimates do not provide strong evidence at the 0.05 level that the two order-specific log-hazard coefficients differ. This is not proof that the effects are identical; it is an uncertainty-aware comparison based on the estimated covariance.

A practical analysis follows a short sequence: verify the event histories and follow-up ends; construct one record per person and event order; fit the chosen order-specific marginal models; request robust variance clustered by person; and report the event-specific coefficients, hazard ratios, confidence intervals, and number of events by order. The cluster identifier is essential: a robust option that treats each stacked row as its own cluster does not address the repeated-record dependence.

1
Check outcome construction.
For each event order, confirm event times follow the stated time origin, and that an unobserved event is censored at the actual follow-up end rather than incorrectly coded as an event.
2
Check risk-set and model specification.
Confirm that every eligible participant has an order-specific record and that the risk set includes people without prior observed recurrences. Use separate baselines by order when that is the intended model.
3
Check estimation and uncertainty.
Look for convergence warnings, sparse event orders, extreme coefficients, and unstable robust standard errors. Verify that clustering uses the participant identifier and that reported intervals use the robust standard errors.
4
Check interpretation.
State which event order, time origin, covariate contrast, and hazard scale are being described. Do not interpret an order-specific coefficient as conditional on the previous event unless the model was explicitly constructed that way.

The Andersen–Gill model provides a different recurrent-event formulation, while PWP models define risk sets conditional on having reached the required event order. WLW is useful when the question concerns marginal associations for ordered event-time endpoints and retaining a common, broad risk set is appropriate. The choice among these approaches changes the estimand and risk-set construction; it is not merely a choice of standard error. WLW also has limitations: later event orders can have few observed events, event-specific proportional-hazards assumptions may be questionable, and informative dropout can bias estimates. Robust variance addresses dependence for uncertainty estimation, not these sources of bias or model inadequacy.

Common Pitfalls

  • Dropping people who have not yet reached the event order. That creates a risk set conditional on earlier recurrence and no longer implements the WLW marginal risk set. Include their records, censored at follow-up end if the target event was not observed.
  • Using ordinary independent-record standard errors. Repeated records from the same person are correlated. Cluster the sandwich variance by participant; do not expect this variance correction to change the coefficient estimate itself.
  • Calling an event-specific hazard ratio a recurrence probability ratio. A hazard ratio compares instantaneous event rates among the relevant order-specific risk sets, conditional on the fitted model. It is not a cumulative probability ratio.
  • Inferring order differences from separate significance tests. Whether one coefficient is statistically significant and another is not does not test whether the coefficients differ. Use their estimated covariance in a direct contrast.
Key takeaway: WLW analysis represents each event order with its own time-to-event outcome and marginal risk set. Fit event-order-specific effects as needed, and use participant-clustered robust uncertainty because each participant can contribute several dependent records.

Check Your Understanding

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

  1. A participant has one recurrence at month 3, no second recurrence, and is followed through month 7. What are the second-order observed time and event indicator?
  2. In a WLW analysis of three event orders, should someone with no observed first recurrence be omitted from the third-order record? Explain.
  3. A treatment coefficient for order 2 is \(-0.20\). What is the model-based hazard ratio comparing treatment with the reference group, and how should its direction be described?
  4. Why can a sandwich variance clustered by participant be appropriate even though each event order has its own Cox partial likelihood?

Solutions. (1) The second-order outcome is \(Y_{i2}=7\), \(\Delta_{i2}=0\): the second recurrence was not observed before censoring. (2) No. The participant contributes a third-order record censored at the end of observed follow-up if no third recurrence occurs; the WLW risk set is not limited to people with observed prior events. (3) The hazard ratio is \(\exp(-0.20)=0.819\), so the estimated order-2 hazard is about 0.819 times that of the reference group, or about 18.1% lower, under the fitted model. (4) The separate order-specific outcomes for the same participant can still be dependent. Clustering combines that participant's score contributions across orders when estimating covariance, allowing valid large-sample uncertainty under the sandwich assumptions.

Clinical Biostats