class: center, middle, inverse, title-slide .title[ # Recurrent events ] .author[ ### Yue Jiang ] .date[ ### STA 490 / STA 690 ] --- ### Recurrent events .vocab[Recurrent events] are those events that might occur multiple times in the same observation: - Time to migraines - Time to flat tires - Time to arrest - Time to sports injuries In these types of settings, we always make assume that observations may *only be at risk for one event at a time* (and often also assume independent right censoring). --- ### Weird toe shoes <img src="img/runner.png" width="90%" style="display: block; margin: auto;" /> --- ### Some illustrative timelines <!-- --> .question[ How might you model these data? *"Is there a treatment effect?"* ] --- ### Poisson regression somehow? <!-- --> .question[ Could you model incidence rates using a Poisson model? How might you incorporate time at risk, and what assumption(s) are you implicitly making? ] --- ### Back to Cox models <!-- --> .question[ How might we extend the Cox model to allow for recurrent events? ] --- ### Back to Cox models **Four questions of interest** when thinking about potential extensions to the Cox model: .question[ - When is the individual "at risk" for an event? - What is the risk set for event `\(k\)` at time `\(t\)`? - Along what dimensions do we consider baseline hazards (e.g., within/across individual? within/across event number?) - Are events "within" individuals correlated? ] --- ### Four extensions to the Cox model In the .vocab[Anderson-Gill] model: - **Timeline:** We care about the entire timeline: all time since baseline - **Risk set:** Anyone who has not yet been censored (events don't take you out) - **Baseline hazard:** Common baseline hazard for all events - **Correlation:** Correlation between event times can be explained by past events. That is, conditional on covariates (which could include time-varying number of previous events), time between events are conditionally independent Strongest assumptions - conditional independence of events (e.g., that experiencing one running injury is not associated with time to subsequent injuries) and common baseline hazards for all events across all individuals (no within-person dependence). It is often useful when interest is simply on the overall recurrence rate (regardless of which it might be). --- ### Four extensions to the Cox model We can relax some assumptions of the Anderson-Gill model by using .vocab[frailty] models: - **Timeline:** Well, it depends - **Risk set:** Also depends - **Baseline hazard:** Depends again - **Correlation:** We allow for a subject-specific "random effect" that characterizes individual "susceptibility" to events (e.g., some runners are just really injury prone) Frailties can be incorporated in other types of models as well, hence all the "it depends." --- ### Four extensions to the Cox model The .vocab[Prentice-Williams-Peterson] model stratifies based on the number of previous numbers of events. For now, let's think of this model in terms of **gap times** (though you can use total calendar time as well): - **Timeline:** The time since the previous event. That is, time is reset to zero after each event. - **Risk set** (for injury `\(k\)` at time `\(t\)`): Anyone who has experienced injury `\(k-1\)`. E.g., people don't become eligible to be at risk for event 2 **until** they've experienced event 1 - **Baseline hazard:** Stratified by which recurrent event it is - **Correlation:** Correlation between event times within individual are conditionally independent This is useful when relationships differ based on which event it is (e.g., if you keep on getting injured, maybe the effect of running on paths with lots roots when looking at time-to-injury is even greater compared to the first time around). These models are *conditional* models (since the hazard of the `\(k\)`th recurrent event is conditional on the `\(k-1\)`th having occurred). --- ### Four extensions to the Cox model Finally, the .vocab[Wei-Lin-Weissfeld] model also stratifies based on the number of previous numbers of events, but considers events "simultaneously": - **Timeline:** The entire timeline *until* the `\(k\)`th event has occurred or censoring - **Risk set** Anyone who has not yet experienced the `\(k\)`th event (regardless of what's happened before) - **Baseline hazard:** Stratified by which event it is - **Correlation:** Ehh, you can add frailties here too, but many people don't actually care given that it's a marginal model (also a lot of potential issues) The WLW model jointly estimates covariate effects from all events. It is a *marginal* model, since each event is treated separately with the same index time across all of them (so it can also allow for different baseline hazards across each of the events). One potential issue here is in the risk set - if in the population some individuals have experienced five events, then *everyone* is technically "at risk" for five events (even if they never experience any at all). --- ### Risk sets and data representation <!-- --> Anderson-Gill data representation: | Event | Interval | Type | Stratum | Treatment | | -------- | -------- | --------- | ------- | --------- | | 1 | (0, 2] | Event | 1 | Weird toe shoes | | 2 | (2, 5] | Event | 1 | Weird toe shoes | | 3 | (5, 12] | Event | 1 | Weird toe shoes | | 4 | (12, 15] | Event | 1 | Weird toe shoes | | 5 | (15, 19] | Event | 1 | Weird toe shoes | | 6 | (15, 21] | Censoring | 1 | Weird toe shoes | --- ### Risk sets and data representation <!-- --> Prentice-Williams-Peterson gap-time data representation: | Event | Interval | Type | Stratum | Treatment | | -------- | -------- | --------- | ------- | --------- | | 1 | (0, 2] | Event | 1 | Weird toe shoes | | 2 | (0, 3] | Event | 2 | Weird toe shoes | | 3 | (0, 7] | Event | 3 | Weird toe shoes | | 4 | (0, 3] | Event | 4 | Weird toe shoes | | 5 | (0, 4] | Event | 5 | Weird toe shoes | | 6 | (0, 6] | Censoring | 6 | Weird toe shoes | --- ### Risk sets and data representation <!-- --> For the Wei-Lin-Weissfeld model, for subject 5 (blue): | Event | Interval | Event Type | Stratum | Treatment | | -------- | -------- | --------- | ------- | --------- | | 1 | (0, 2] | Event | 1 | Weird toe shoes | | 2 | (0, 5] | Event | 2 | Weird toe shoes | | 3 | (0, 12] | Event | 3 | Weird toe shoes | | 4 | (0, 15] | Eveny | 4 | Weird toe shoes | | 5 | (0, 19] | Event | 5 | Weird toe shoes | (don't consider time after 19 if 5 is the max. number of events) --- ### Risk sets and data representation <!-- --> For the Wei-Lin-Weissfeld model, for subject 4 (red): | Event | Interval | Event Type | Stratum | Treatment | | -------- | -------- | --------- | ------- | --------- | | 1 | (0, 12] | Event | 1 | Normal shoes | | 2 | (0, 16] | Censoring | 2 | Normal shoes | | 3 | (0, 16] | Censoring | 3 | Normal shoes | | 4 | (0, 16] | Censoring | 4 | Normal shoes | | 5 | (0, 16] | Censoring | 5 | Normal shoes |