Solution

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

Add a stratum indicator that is “First” for the first episode and “Later” for every subsequent episode, including the final censored episode:
PatientNext-event episodeGap startGap stopEventStratum
0011024.810First
001238.310Later
001337.110Later
0014311.710Later
001538.100Later
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.

New to topics? Read the docs here!