Recurrent Event Analysis
A method that analyzes both the timing and the frequency of events when the same person experiences an event more than once.
How long does it take for an asthma patient to return to the emergency room after a first visit? If the same patient went to the ER three or more times in a year, can all of those visits be included in the analysis? Does the pattern of repeat visits differ by treatment method or air pollution level?
In this way, the method that analyzes the timing and pattern of repetition when the same type of event occurs several times to the same subject is recurrent event analysis. Unlike survival analysis that observes only the first event, it can follow the second, third, and later events.
In an ordinary Cox survival analysis, if only the first ER visit is designated as the event, information on later repeat visits is not included in the analysis. Recurrent event analysis uses models that can account for the gaps between repeat visits, the order of events, and the correlation of events within a patient. However, the Andersen–Gill model and the PWP model differ in how they handle risk sets and the order of events.
Recurrent event analysis is useful for data in which the same event occurs several times, such as ER visits, disease recurrence, repeated infections, frequent machine breakdowns, and repeat customer purchases. In this article, using the example of asthma patients, we look at how the data are structured, the main models, how to interpret hazard ratios, the assumptions of the analysis, and how to report results.
What is recurrent event analysis?
It analyzes situations in which the same event happens to one person two or more times.
Recurrent event analysis uses the occurrence times of multiple events that happen to the same subject during the observation period. Here, an event is an outcome clearly defined in the study, such as an ER visit due to asthma.
For example, if patient A visited at 2, 5, and 9 months, each of the three visits is recorded. It is easy to assume that visits by different patients are independent, but repeated visits within one patient share past disease status and personal characteristics, so their correlation needs to be taken into account.
Why is recurrent event analysis needed?
Analyzing only the first visit can miss recurrences and the burden of repeat visits.
Suppose two asthma patients both made their first ER visit one month after follow-up began. After that, patient A never visited again, but patient B visited five more times. An analysis that targets only the first event can hardly tell apart how the two patients fared afterward.
Recurrent event analysis reflects these differences and examines how treatment method and environmental factors relate to the rate of repeat visits. However, you should choose the model according to whether the study's aim is the total number of visits, the time until the next visit, or the risk for each visit in order.
How are recurrent events recorded?
Visit times and the intervals between events are separated in time order.
Visits can occur several times between the start and end of each patient's observation. You need to record the treatment start date, treatment changes during follow-up, visit dates, and the date follow-up stopped separately. It is also important to structure the data so that no time intervals overlap.
Real example: repeat ER visits by asthma patients
An example analysis that uses every repeat visit by the same patient.
Suppose we follow 240 asthma patients for 12 months. We record the type of treatment, the patient's baseline severity, monthly air pollution exposure, and the dates of ER visits. The figures and tables below are hypothetical data for learning purposes.
| Variable | Example | Role in the analysis |
|---|---|---|
| Patient ID | P001 | Links repeat visits to one individual |
| Visit dates | Day 65 · day 141 · day 250 | Occurrence times of recurrent events |
| Treatment type | Standard treatment / intensified treatment | Main explanatory variable |
| Environmental exposure | Monthly fine particulate matter concentration | Candidate time-varying covariate |
| End of follow-up | Day 365 or dropout | Checking censoring and follow-up time |
Real ER visit data are affected by many factors, such as seasonality, disease severity, and missed visits to other hospitals. So you should first check when the explanatory variables were measured and the scope of the outcome records.
How are the data structured?
Create event intervals for each individual, with a start time and a stop time.
| Patient | Start day | Stop day | Event | Cumulative visit number |
|---|---|---|---|---|
| P001 | 0 | 65 | 1 | 1 |
| P001 | 65 | 141 | 1 | 2 |
| P001 | 141 | 250 | 1 | 3 |
| P001 | 250 | 365 | 0 (censored) | — |
| P002 | 0 | 112 | 1 | 1 |
| P002 | 112 | 365 | 0 (censored) | — |
The table above is an illustrative example close to the start–stop format of the Andersen–Gill model. If you use the PWP model, you need to specify strata and risk sets according to event order, and also decide which time scale to use: total time or time elapsed since the previous event.
How does the Andersen–Gill model work?
It treats the whole process of recurrent events with an event intensity model.
The Andersen–Gill (AG) model is a counting-process extension of the Cox model. It records the recurrent events during the observation period over time and estimates the effect of covariates on the event intensity. In its basic form, it does not use a separate baseline hazard for each event order.
Since events from the same patient are not independent, in practice robust (sandwich) standard errors clustered by individual are often used. This means you need to understand the estimation of the coefficients and the assessment of uncertainty in the standard errors as separate things.
How is the PWP model different?
It separates risk sets and baseline hazards by which visit number it is.
The Prentice–Williams–Peterson (PWP) model takes the order of events into account. A second ER visit is possible only for patients who have already had a first visit, so a separate risk set is set up for each event order.
| Aspect | AG model | PWP model |
|---|---|---|
| Risk set | A common process for recurrent events during follow-up | Only those who had the previous event are in the risk set for the next event |
| Baseline hazard | Usually a common baseline hazard | Set differently for each event order |
| Time scale | Mainly total follow-up time | Total time (PWP-TT) or gap time between events (PWP-GT) |
| Suitable question | What is the overall intensity of repeat visits? | What is the risk of a second or third visit? |
Using gap time in the PWP model lets you focus on how much time has passed since the previous event. Whichever model you use, check the actual research question and the event process before choosing.
How do you interpret the hazard ratio (HR)?
Interpret the relative difference in the intensity of recurrent events, other things being equal.
Below is a hypothetical example presented for practice in reading model output tables. It is not a result obtained by fitting actual data on 240 patients.
| Variable | HR | 95% confidence interval | p-value |
|---|---|---|---|
| Intensified treatment (vs. standard) | 0.72 | 0.56–0.93 | .011 |
| Baseline severity score +1 | 1.27 | 1.11–1.46 | < .001 |
| Fine particulate matter +10 μg/m³ | 1.12 | 1.03–1.22 | .008 |
An HR of 0.72 for intensified treatment means that, under this model and its assumptions, compared with standard treatment, the instantaneous intensity of repeat ER visits is about 28% lower. It does not mean that the probability of visiting the ER during the 12 months is 28 percentage points lower, or that the total number of visits necessarily falls by 28%.
What graphs can show recurrent event results?
Look at the mean cumulative number of events together with trends between groups.
The mean cumulative function expresses how many events have occurred per person, on average, up to a given time. The difference between the lines above is only an example; statistical significance must be assessed separately with confidence intervals and model results.
What should you check in the analysis?
Check the correlation of repeated measurements, the proportional hazards assumption, censoring, and treatment changes.
Correlation within the same patient
Since a patient's multiple visits can be related to each other, variance estimation that accounts for clustering by individual may be needed. Even with robust standard errors, problems such as missing severity information or dependence over time are not all solved.
Event definition and event order
Mixing ER visits with hospital admissions, or scheduled visits with emergency visits, makes the event definition unclear. When using the PWP model, check that there are enough events for each event order.
Proportional hazards and time-varying covariates
Check the proportional hazards assumption that the effect stays constant throughout the observation period, and when fine particulate exposure or treatment type changes, reflect the time of the change. When treatment changes right after an event, also consider the possibility of reverse causation.
Loss to follow-up and competing events
A patient's death or loss to follow-up can prevent observation of later visits. In particular, death can be a competing event that is hard to treat as simple independent censoring of ER visits, so consider an extended analysis suited to the situation.
How does it differ from other analyses?
The first event, the total number of events, and the time to recurrent events are different research questions.
| Method | Question addressed | Key difference |
|---|---|---|
| First-event Cox analysis | How long until the first ER visit? | Does not directly use event information after the first visit |
| Poisson / negative binomial regression | How many visits in total during a fixed period? | Focuses on event counts; usually needs adjustment for exposure time |
| AG recurrent event model | How does the overall intensity of repeat visits differ? | Analyzes multiple visits together with event times |
| PWP recurrent event model | How does the risk of a second or third visit differ? | Sets up risk sets by event order |
| Multistate model | What about moves between states, such as ER → admission → discharge? | Distinguishes transitions between multiple states |
The approach depends on whether timing information matters, whether the order of events within patients matters, and whether follow-up lengths differ. Simple count comparisons alone can hardly explain the gaps between events or the order of transitions.
How do you report recurrent event analysis results?
Present the event definition, data structure, model choice, and uncertainty together.
You should report not only the number of study subjects but also the total number of events, the distribution of events per subject, the follow-up period, the event definition, censoring, the time scale, and the recurrent event model used. If the standard errors were adjusted for clustering by individual, state this as well.
A hypothetical case was constructed analyzing repeated ER visits over 12 months among 240 asthma patients. In illustrative results using the Andersen–Gill model with robust standard errors accounting for repeated observations within patients, the visit intensity in the intensified treatment group was lower than in the standard treatment group (HR = 0.72, 95% CI [0.56, 0.93], p = .011). A 10 μg/m³ increase in fine particulate matter concentration was also associated with increased visit intensity (HR = 1.12, 95% CI [1.03, 1.22], p = .008). All estimates are hypothetical values for understanding the reporting format.
In an actual paper, the results should reflect the exact numbers of observed events and censored observations, diagnostics of the model assumptions, and the content of sensitivity analyses.
Where is recurrent event analysis used?
It is used for health, service, and operations data in which events do not end after one occurrence.
| Field | Example recurrent event | Research question |
|---|---|---|
| Medicine and health | Repeat ER visits by asthma patients | Relationship between treatment and environmental factors and the intensity of repeat visits |
| Infectious disease research | Repeated infections in one person | Comparing the timing of repeated infections by risk factor |
| Industry and manufacturing | Repeated machine breakdowns | Time until failure recurs after maintenance |
| Services | Repeated customer support requests | Change in inquiry frequency after a service redesign |
| Insurance and finance | Repeated claims by the same policyholder | Occurrence of repeated claims by risk factor |
Recurrent event analysis looks at what happens even after the first event.
It records every event that happens multiple times to the same subject to understand how they occur.
When analyzing asthma patients' ER use, looking only at the first visit misses differences in later repeat visits. Recurrent event analysis uses the occurrence times of multiple visits to help estimate differences in event intensity by treatment type or environmental exposure. In particular, the Andersen–Gill model, which analyzes all repeat visits, and the PWP model, which distinguishes the order of events, can be chosen according to the research question.
However, it is important to properly handle the correlation of repeated events within the same patient, missing visit records, the end of follow-up, treatment changes over time, and risk sets by event order. The hazard ratio, too, should not be read directly as the probability of returning or as the causal effect of treatment. You can trust the results only after first checking how the event was defined and when it was observed.
Recurrent event analysis uses the timing not only of the first event but of the series of events that follow for the same subject. Andersen–Gill focuses on the overall event process, and PWP on risk sets by event order. Interpreting the hazard ratio requires considering within-patient correlation, censoring, time-varying factors, and the model assumptions together.