← 6. Survival analysis
Recurrent Event Analysis
Try this analysis →

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.

Recurrent eventsAndersen–GillPWPHazard ratio (HR)

Patient APatient BPatient CPatient D0 mo6 mo12 moER visitEnd of follow-up (censored)

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.

SECTION 1

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.

SECTION 2

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.

SECTION 3

How are recurrent events recorded?

Visit times and the intervals between events are separated in time order.

ER visits can happen to one patient multiple timesRecord each repeat visit within each patient's observation periodPatient APatient BPatient CPatient D0 mo6 mo12 moER visit+ End of follow-up (censored)
A timeline mock-up showing repeated ER visits by patient. Dots mark events, and the right end marks the end of follow-up.

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.

SECTION 4

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.

VariableExampleRole in the analysis
Patient IDP001Links repeat visits to one individual
Visit datesDay 65 · day 141 · day 250Occurrence times of recurrent events
Treatment typeStandard treatment / intensified treatmentMain explanatory variable
Environmental exposureMonthly fine particulate matter concentrationCandidate time-varying covariate
End of follow-upDay 365 or dropoutChecking 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.

SECTION 5

How are the data structured?

Create event intervals for each individual, with a start time and a stop time.

PatientStart dayStop dayEventCumulative visit number
P00106511
P0016514112
P00114125013
P0012503650 (censored)—
P002011211
P0021123650 (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.

SECTION 6

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.

SECTION 7

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.

AspectAG modelPWP model
Risk setA common process for recurrent events during follow-upOnly those who had the previous event are in the risk set for the next event
Baseline hazardUsually a common baseline hazardSet differently for each event order
Time scaleMainly total follow-up timeTotal time (PWP-TT) or gap time between events (PWP-GT)
Suitable questionWhat 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.

SECTION 8

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.

VariableHR95% confidence intervalp-value
Intensified treatment (vs. standard)0.720.56–0.93.011
Baseline severity score +11.271.11–1.46< .001
Fine particulate matter +10 μg/m³1.121.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%.

Basis for interpretation: The HR refers to the relative intensity of events, for the events and risk sets defined by the model. It should not be read directly as the causal effect of treatment or as an individual's probability of returning.
SECTION 9

What graphs can show recurrent event results?

Look at the mean cumulative number of events together with trends between groups.

Mean cumulative number of ER visits · illustrative hypothetical example00.51.01.52.0036912 moStandard treatmentIntensified treatment
A conceptual mock-up showing the group mean cumulative number of events over time. The values in the graph were not calculated from real data.

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.

SECTION 10

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.

Caution: If patients receiving intensified treatment differ in baseline severity, the difference in visits between treatment groups cannot be attributed to the treatment. Observational studies require examining confounding and selection bias.
SECTION 11

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.

MethodQuestion addressedKey difference
First-event Cox analysisHow long until the first ER visit?Does not directly use event information after the first visit
Poisson / negative binomial regressionHow many visits in total during a fixed period?Focuses on event counts; usually needs adjustment for exposure time
AG recurrent event modelHow does the overall intensity of repeat visits differ?Analyzes multiple visits together with event times
PWP recurrent event modelHow does the risk of a second or third visit differ?Sets up risk sets by event order
Multistate modelWhat 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.

SECTION 12

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.

Example sentences for a paper

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.

SECTION 13

Where is recurrent event analysis used?

It is used for health, service, and operations data in which events do not end after one occurrence.

FieldExample recurrent eventResearch question
Medicine and healthRepeat ER visits by asthma patientsRelationship between treatment and environmental factors and the intensity of repeat visits
Infectious disease researchRepeated infections in one personComparing the timing of repeated infections by risk factor
Industry and manufacturingRepeated machine breakdownsTime until failure recurs after maintenance
ServicesRepeated customer support requestsChange in inquiry frequency after a service redesign
Insurance and financeRepeated claims by the same policyholderOccurrence of repeated claims by risk factor
✓ Wrap-up

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.

KEY TAKEAWAY

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.