Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2013/iii/paper-32/6/c/solution

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
PatientNext-event episodeStartStopEvent
0011024.810
001227.833.110
001336.140.210
001443.251.910
001554.960.000
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.

New to topics? Read the docs here!