Recurrent events analysis is a statistical framework for modeling time-to-event data where subjects can experience the same type of event multiple times, such as repeated hospitalizations or tumor recurrences. Unlike standard survival analysis that terminates at the first event, these methods account for within-subject correlation by treating each subject as a cluster of potentially dependent observations, using robust variance estimation to avoid inflated Type I errors.
Glossary
Recurrent Events Analysis

What is Recurrent Events Analysis?
Recurrent events analysis encompasses statistical methods for analyzing repeated occurrences of the same event type within a subject, using models like Andersen-Gill or Prentice-Williams-Peterson to account for within-subject correlation.
The two dominant models are the Andersen-Gill (AG) intensity model, which assumes events are independent and treats all events as part of a single counting process, and the Prentice-Williams-Peterson (PWP) models, which stratify by event order. The PWP total time model resets the clock after each event, while the gap time model measures intervals between successive events, making it suitable for analyzing cyclical phenomena like epileptic seizures.
Core Recurrent Events Models
Statistical methods for analyzing repeated occurrences of the same event type within a subject, using models that account for within-subject correlation and varying risk intervals.
Andersen-Gill (AG) Model
An extension of the Cox proportional hazards model that treats recurrent events as independent within a subject, using a robust sandwich variance estimator to correct for the correlation. The model assumes that the baseline hazard is common across all events and that the subject remains at risk for subsequent events immediately after a prior event. This is the most commonly applied model for recurrent events due to its simplicity and efficiency, but it relies on the assumption that events are unordered and exchangeable.
Prentice-Williams-Peterson (PWP) Model
A stratified Cox model that analyzes ordered events by stratifying on the event rank. Two variations exist:
- PWP Total Time (PWP-TT): The time scale resets to zero after each event, measuring time from study entry.
- PWP Gap Time (PWP-GT): The clock resets after each event, measuring the time since the last occurrence. This model assumes that a subject cannot be at risk for the k-th event until the (k-1)-th event has occurred, making it ideal for ordered, sequential processes like tumor recurrences.
Wei-Lin-Weissfeld (WLW) Model
A marginal model that simultaneously models the time to each ordered event from the study origin, treating each event type as a separate stratum. Unlike the PWP model, a subject is considered at risk for all events from the start of observation, regardless of whether prior events have occurred. This approach is useful when the scientific interest lies in the population-averaged effect of covariates on each specific event, rather than conditioning on the event history.
Mean Cumulative Function (MCF)
A non-parametric estimator that plots the population-averaged cumulative number of events over time, analogous to the Nelson-Aalen estimator for recurrent events. The MCF does not require proportional hazards assumptions and provides a direct, interpretable visualization of the event burden in a treatment group. It handles varying follow-up times and is robust to the underlying correlation structure, making it a standard first-line descriptive tool before fitting regression models.
Frailty Models for Recurrent Events
Extends the Andersen-Gill framework by incorporating a subject-specific random effect (frailty) to explicitly model the unobserved heterogeneity that induces within-subject correlation. Common distributions for the frailty term include Gamma and log-normal. This approach allows the estimation of the degree of dependence between events and can distinguish between a subject's underlying susceptibility and the effect of covariates. It is particularly useful when event occurrences are strongly clustered within individuals.
Conditional Models (PWP-GT) vs. Marginal Models (WLW)
A critical distinction in recurrent event analysis:
- Conditional Models (PWP-GT): Condition on the subject's event history. The risk set for event k only includes subjects who have experienced event k-1. This answers: 'What is the effect of treatment on the time between recurrences?'
- Marginal Models (WLW): Do not condition on prior events. All subjects are in the risk set for all events from time zero. This answers: 'What is the treatment effect on the time to the k-th event in the population?' The choice depends on whether the scientific question targets a within-subject trajectory or a population-level comparison.
Comparison of Recurrent Events Models
Comparative analysis of the four primary statistical frameworks for analyzing repeated occurrences of the same event type within a subject, highlighting their risk set definitions, correlation structures, and clinical applicability.
| Feature | Andersen-Gill (AG) | Prentice-Williams-Peterson (PWP) | Wei-Lin-Weissfeld (WLW) | Frailty Model |
|---|---|---|---|---|
Risk set definition | Unrestricted: subject at risk for all events from time zero | Gap time: at risk for event k only after event k-1 occurs | Stratified: separate baseline hazard for each event rank | Subject-specific random effect modifies baseline hazard |
Baseline hazard assumption | Common baseline across all events | Event-specific baseline hazard | Event-specific baseline hazard | Common baseline with multiplicative frailty |
Within-subject correlation handling | Robust sandwich variance estimator | Stratification by prior event count | Stratification by event number | Explicit random effect (gamma or log-normal) |
Time scale | Total time from study entry | Gap time since previous event | Total time from study entry | Total time from study entry |
Proportional hazards assumption | ||||
Handles terminal events | ||||
Interpretation of treatment effect | Population-averaged effect on overall event rate | Conditional effect given prior event history | Marginal effect on each event-specific hazard | Subject-specific effect accounting for heterogeneity |
Software implementation | coxph() with cluster(id) | coxph() with strata(enum) | coxph() with strata(event) | coxme() or frailty() in coxph() |
Frequently Asked Questions
Clear, technical answers to common questions about statistical methods for analyzing repeated occurrences of the same event type within a subject, including model selection, within-subject correlation, and interpretation.
Recurrent events analysis is a set of statistical methods for analyzing time-to-event data where the event of interest can occur multiple times within the same subject, such as repeated hospitalizations, tumor recurrences, or machine failures. It differs fundamentally from standard survival analysis, which typically models only the time to the first event and treats subsequent events as censored or ignores them entirely. The key distinction is the need to account for within-subject correlation: multiple events from the same individual are not independent, and ignoring this clustering leads to underestimated standard errors and inflated Type I error rates. Recurrent events models address this through robust variance estimation (sandwich estimators) or by incorporating subject-specific random effects (frailty terms). The data structure also differs, requiring a counting process format where each subject contributes multiple rows of data, one for each event interval, with start and stop times defining the at-risk periods.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Recurrent events analysis extends standard survival methods to handle repeated outcomes. Master these foundational and advanced concepts to build robust time-to-event models.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us