= Solution
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
|| Patient
|| Next-event episode
|| Gap start
|| Gap stop
|| Event
|| $z$
| 001
| 1
| 0
| 24.8
| 1
| 0
| 001
| 2
| 3
| 8.3
| 1
| 0
| 001
| 3
| 3
| 7.1
| 1
| 0
| 001
| 4
| 3
| 11.7
| 1
| 0
| 001
| 5
| 3
| 8.1
| 0
| 0
For example, the second stop is $33.1-24.8=8.3$, while its entry is $27.8-24.8=3$. 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.
Back to article page