Tutorials › Competing Risks and Multi-State Models › Comparing AG, PWP, And WLW

Recurrent-Event Estimands and Models · Tutorial 590 of 699

Comparing AG, PWP, And WLW

Learn how Andersen–Gill, PWP, and WLW models define who is at risk and what their covariate effects mean.

Advanced 11 min read

What You'll Learn

  • Identify who belongs to the risk set in Andersen–Gill, PWP, and WLW models.
  • Distinguish Andersen–Gill’s history-conditional intensity from PWP’s event-order-conditional hazard and WLW’s marginal ordered-event hazards.
  • Explain how total-time and gap-time clocks change the PWP comparison.
  • Interpret a covariate hazard ratio in the population and event-history context of its model.
  • Recognize when the three models are not estimating interchangeable effects.

Why These Models Are Not Interchangeable

A recurrent-event data set can record several events for one person, such as repeated hospitalizations. Andersen–Gill (AG), Prentice–Williams–Peterson (PWP), and Wei–Lin–Weissfeld (WLW) models all use event-time information, but they do not define the risk set or the target comparison in the same way. As a result, the same covariate and a similar-looking hazard ratio can have different scientific meanings across the models.

The key distinctions are who is considered at risk, what event history the model conditions on, and which clock measures elapsed time. These choices determine the interpretation of an estimated effect; they are not merely different data formats for an otherwise identical analysis.

Notation: For subject \(i\), let \(N_i(t)\) count recurrent events by time \(t\), let \(Y_i(t)\) indicate that the subject is under observation and at risk at \(t\), and let \(X_i\) be a covariate. Let \(T_{ik}\) be the time of subject \(i\)'s \(k\)th event, with \(T_{i0}=0\). A hazard describes the instantaneous event rate at a given time among the subjects in the model's risk set, conditional on the model's specified information.

Three Risk-Set and Conditioning Choices

In the AG model, subjects contribute to the event process whenever they are under observation and at risk. A common proportional-intensity specification is

$$ \lambda_i(t\mid\mathcal{H}_i(t-)) = Y_i(t)\lambda_0(t)\exp\{\beta X_i\}, $$

where \(\mathcal{H}_i(t-)\) is the subject's observed event and covariate history just before \(t\). The coefficient describes a multiplicative association with the event intensity conditional on the model and history. The usual AG clock is time since a common origin, such as study entry; it does not reset after each recurrence. The subject can contribute again after an event if observation continues.

PWP models separate event orders. For the \(k\)th event, a subject enters the risk set only after experiencing event \(k-1\), and leaves it at the \(k\)th event or censoring. Thus, the event-\(k\) hazard is conditional on having reached event order \(k\). One can stratify the baseline hazard by event order, and estimate a common covariate effect or order-specific effects.

$$ \lambda_{ik}(t\mid T_{i,k-1}<t,\mathcal{H}_i(t-)) = Y_{ik}(t)\lambda_{0k}(t)\exp\{\beta_k X_i\}. $$

For PWP total time, the clock \(t\) measures time from the common origin. For PWP gap time, the clock for event \(k\) is \(u=t-T_{i,k-1}\), time since the preceding event. In both versions, the event-\(k\) risk set is restricted to subjects who have experienced event \(k-1\) and have not yet experienced event \(k\), while still observed.

WLW models each ordered event time as a separate marginal endpoint. For event order \(k\), the risk set starts at the common origin for subjects whose \(k\)th event has not yet occurred and who remain observed. It therefore can include people who have not yet experienced event \(k-1\). A typical event-specific model is

$$ \lambda_{ik}(t\mid X_i) = Y_{ik}^{\mathrm{WLW}}(t)\lambda_{0k}(t)\exp\{\beta_k X_i\}, $$

where \(Y_{ik}^{\mathrm{WLW}}(t)\) indicates observation and that the \(k\)th event has not occurred by \(t\). This is a marginal, event-order-specific hazard description, not a hazard conditional on having just entered the event-\(k\) risk set after event \(k-1\). Because event times from the same subject are dependent, inference must account for within-subject dependence; robust variance estimation is commonly used.

FeatureAndersen–GillPWPWLW
Risk-set membershipObserved subjects at risk for another eventFor event \(k\), subjects who have experienced event \(k-1\), but not \(k\)For event \(k\), observed subjects who have not yet had event \(k\), including those not yet at order \(k-1\)
ConditioningCurrent intensity conditional on observed historyEvent-\(k\) hazard conditional on reaching order \(k\)Marginal event-specific hazard for the ordered endpoint
ClockUsually time since common originTotal time since origin or gap time since prior eventUsually time since common origin
Effect meaningCovariate association with recurrent-event intensityCovariate association with the next ordered event among those reaching that orderCovariate association with the marginal hazard of the \(k\)th event time

Worked Examples: Membership, Clock, and Interpretation

Worked Example: Who Is at Risk for a Second Event?

Consider three hypothetical subjects followed from study entry. Subject A has events at times 2 and 5 and is followed through time 8. Subject B has an event at time 4 and is followed through time 8 without a second event. Subject C has events at times 1 and 3 and is followed through time 6. Determine who is in each model's second-event risk set at time \(t=2.5\).

For AG, all three are still observed at time 2.5 and have not experienced a terminal event or left follow-up. Each can contribute to the recurrent-event process, so the AG risk set is A, B, and C.

For PWP event order 2, a subject must have had a first event and not yet had a second. A had the first event at time 2, so A is in. B has not yet had a first event, so B is not in. C had the first event at time 1 and has not yet had the second event at time 3, so C is in. The PWP risk set is A and C.

For WLW's second-event endpoint, the second event has not occurred for any of the three by time 2.5, and all remain observed. Thus the WLW risk set is A, B, and C. B's inclusion is the important contrast: WLW does not require that a subject has already experienced the first event to contribute to the second-event marginal endpoint.

Worked Example: PWP Total Time Versus Gap Time

Suppose three hypothetical subjects have first and second event times as follows: A has events at 2 and 5, B at 4 and 6, and C at 1 and 7. Assume all remain under observation through time 8. For a PWP model of the second event, compare the event times on the two clocks.

On the total-time clock, the second events occur at \(t=5,6,7\). For subject A, the interval in the second-event risk set begins after time 2 and ends at time 5; for B it begins after 4 and ends at 6; for C it begins after 1 and ends at 7. The model compares second-event hazards at a given time since study entry among subjects who have reached the first event and remain at risk for the second.

On the gap-time clock, subtract each subject's first-event time from the second-event time. The gaps are \(5-2=3\) for A, \(6-4=2\) for B, and \(7-1=6\) for C. The PWP gap-time model compares second-event hazards by time since the first event. For example, at gap time \(u=2\), B has the second event; A and C are still at risk for their second event because their gaps exceed 2. These are different time alignments, so the fitted baseline hazard and the comparison represented by a covariate effect need not match between the two clock choices.

Worked Example: The Same Numerical Hazard Ratio, Different Meaning

Suppose separate hypothetical fitted models each estimate a treatment coefficient of \(\hat{\beta}=\log(1.5)=0.4055\). Treatment is a binary indicator, and each model uses the relevant event-order or event-process specification. The arithmetic gives \(\exp(\hat{\beta})=\exp(0.4055)\approx1.500\).

In AG, this is a 1.50 multiplicative association with the recurrent-event intensity for treated versus untreated subjects, conditional on the AG model's history and risk process. In PWP for event order \(k\), it is a 1.50 hazard ratio for the \(k\)th event among subjects who have already experienced event \(k-1\) and are still at risk. In WLW for the \(k\)th event, it is a 1.50 association with the marginal hazard of that ordered event-time endpoint in its event-specific risk set.

All three numerical ratios compare treated with untreated subjects in their respective models, but they do not thereby estimate the same scientific quantity. The values here are hypothetical and equal only to make the interpretive distinction clear; equality of estimates is not a general result.

Why the Risk-Set Distinction Follows From the Models

The risk-set rules can be seen directly from the indicators used in the model. For PWP, the event-\(k\) indicator is one only after event \(k-1\) and before event \(k\), while observation continues. For WLW, the event-\(k\) indicator remains one from the common origin until event \(k\) or censoring, whether or not event \(k-1\) has occurred. The two indicators encode different populations at risk.

$$ Y_{ik}^{\mathrm{PWP}}(t) = I\{T_{i,k-1}<t\leq T_{ik},\ \text{subject }i\text{ is observed at }t\}, $$
$$ Y_{ik}^{\mathrm{WLW}}(t) = I\{t\leq T_{ik},\ \text{subject }i\text{ is observed at }t\}. $$

If subject \(i\) has not had event \(k-1\) by \(t\), then \(Y_{ik}^{\mathrm{PWP}}(t)=0\), whereas \(Y_{ik}^{\mathrm{WLW}}(t)\) can still equal 1. Consequently, the partial-likelihood comparisons in the two models are formed from different sets of subjects at event times. AG instead forms comparisons for the recurrent-event intensity using the process risk indicator \(Y_i(t)\) and the subject's observed history. This is why one cannot translate a coefficient from one model into another by changing only its label.

Assumptions, Diagnostics, and Limits

Each approach requires a meaningful event definition, correct recording of event times and censoring, and a risk process appropriate to how follow-up works. The proportional-effects specification assumes that the covariate's log-hazard effect is constant over the modeled time scale unless the model allows it to vary. For inference, censoring must be noninformative under the model's conditioning information, or handled with an appropriate method. WLW additionally requires valid event-specific marginal models and inference that accounts for dependence among a person's ordered event times. In PWP, the event-order conditioning makes it essential to represent entry into each order correctly.

Practical diagnostics should begin with the data structure rather than a coefficient table. Check that event times are ordered, that a person cannot enter a PWP event-\(k\) risk set before event \(k-1\), and that WLW event-\(k\) follow-up is represented from the common origin as intended. Inspect numbers at risk over time and across event orders: sparse high-order risk sets can make PWP estimates unstable. Compare event-time distributions and covariate effects across event orders, and assess proportional effects on the clock the model actually uses. A gap-time analysis should not be diagnosed as though its baseline were indexed by time since study entry.

A common mistake is to claim that WLW is “wrong” because a subject who has not yet had a first event is included in the second-event risk set. That reasoning imposes PWP's conditional question on a model designed for marginal ordered-event endpoints. The correction is to ask whether the scientific interpretation requires conditioning on having reached the previous event; if it does, PWP's risk sets represent that condition, whereas WLW's do not. Conversely, PWP does not estimate an effect for all subjects from baseline on the marginal second-event endpoint.

None of these models automatically estimates a causal treatment effect. A hazard ratio is conditional or marginal according to the model specification, but it remains an association unless the design and causal assumptions justify a causal interpretation. Nor does a hazard ratio alone state how many total events will occur or the absolute probability of an event. Those questions require summaries or models targeted to those quantities. The approaches also differ in efficiency and robustness to misspecification; a favorable numerical fit statistic does not erase a mismatch between the risk set and the scientific question.

Key takeaway: AG models recurrent-event intensity using the observed event process; PWP models the next ordered event conditional on having reached that order; WLW models ordered event times marginally from a common origin. PWP's total-time and gap-time versions further differ in how elapsed time is aligned.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. In a PWP model for event order 3, what must be true of a subject before the subject can enter the risk set?
  2. At time 4, a subject is observed and has not had a second event, but has not yet had a first event. Can this subject be in the PWP second-event risk set? Can the subject be in the WLW second-event risk set?
  3. A subject's first event is at time 3 and second event at time 8. What is the second-event time on the total-time and gap-time clocks?
  4. Why is a WLW second-event hazard ratio not automatically a PWP second-event hazard ratio?

Solutions. (1) The subject must have experienced the second event and must still be observed and free of the third event. (2) No for PWP, because the subject has not reached event order 2; yes for WLW, provided the subject remains observed and has not yet experienced event 2. (3) Total time is 8 time units from the common origin; gap time is \(8-3=5\) time units since the first event. (4) The models use different risk sets and conditioning: PWP conditions on reaching the preceding event order, while WLW's event-specific marginal risk set can include subjects who have not yet reached it.

Clinical Biostats