Use one row per consecutive at-risk episode, retaining a patient identifier for dependence and an episode number for event order. In calendar time, the intervals are ; status is one if the row ends in a headache and zero if it ends in censoring. Patient 001 contributes
The fifth episode is censored, not a fifth observed headache. All rows retain . This start-stop recurrent-event data layout corresponds to the counting-process intensity in survival analysiswhere indicates that the patient is currently observed and eligible for a headache. Fit the regression coefficient by Cox partial likelihood using the resulting risk sets, and estimate the baseline cumulative hazard nonparametrically, for example by the Breslow estimator. Patient rows are portions of one history, not new independent patients.
The second episode starts only after the first headache, at 24.8; its row is absent from every risk set before that time. More generally, episode starts at the observed end of episode . The left-open, right-closed interval convention assigns an event at a shared boundary only to the interval ending there. Thus the first event is counted once, and the second cannot be counted before the first. Preserving the episode entry times and patient history enforces the ordering; entering every recurrence as a new record starting at treatment time zero would not do so.
Set the availability indicator to zero during the three-day recovery interval after each headache. Keep each episode's endpoint, but delay its entry to the previous headache time plus three. The calendar-time rows become
The first interval still begins at zero because the patient was already headache-free for at least seven days before treatment. The recovery gaps supply no at-risk exposure and no partial-likelihood risk-set membership; they should not be retained as ordinary event-free at-risk time. If recovery extends past administrative closure, no subsequent eligible interval is created. This is a refractory period in recurrent-event analysis, represented by availability rather than by changing the event times.
For second and subsequent episodes, subtract the preceding headache time from both calendar endpoints. The new clock is the age since the start of that headache, not the age since recovery ended. Keeping the recovery restriction from part (c) therefore gives
For example, the second stop is , while its entry is . Thus subsequent rows begin at gap age three, not zero. The first row retains time since treatment started. Keep the patient and episode labels, and preferably the original calendar endpoints as auxiliary fields: gap ages in different episodes are not chronological treatment times. The value 7.1 for episode three being smaller than 8.3 for episode two does not reverse their occurrence order. This gap-time recurrent-event model forms risk sets on the episode-age scale while preserving each episode's historical eligibility.
Add a stratum indicator that is “First” for the first episode and “Later” for every subsequent episode, including the final censored episode:
A Stratified Cox model then uses distinct baseline hazards and , with a common treatment coefficient unless an interaction is explicitly desired. Form separate risk sets within the two strata and multiply their partial likelihoods. There is no need to force every later event number to have its own baseline when the stated aim is only first versus subsequent headaches. This is a first-event versus recurrent-event baseline stratification.
The episodes from one patient share treatment, biological susceptibility and prior history, so they are not independent observations. Treating every row as an unrelated subject can substantially understate uncertainty. Two approaches address this within-patient recurrent-event dependence:
- A patient-clustered sandwich covariance matrix retains a suitable working Cox mean/intensity model but groups score contributions by patient. If is the patient's score contribution and the observed information, its form is . Independent patients, rather than independent rows, determine the sampling units. This corrects uncertainty for within-patient dependence when the working estimating equation is appropriate; it does not repair an incorrect mean model.
- A shared frailty model introduces a common latent positive multiplier for all of patient 's episode hazards, often with a specified gamma or lognormal distribution. Given frailty and the relevant history, the event mechanism is modeled through that patient's intensity. Estimate treatment and frailty parameters by integrating or profiling the latent effect. This models persistent heterogeneity directly, but relies on the frailty assumptions and generally gives a conditional treatment-effect interpretation.
Articles by others on the same topic
There are currently no matching articles.