First-event versus recurrent-event baseline stratification (source code)

= First-event versus recurrent-event baseline stratification

Separate first-event episodes from all later episodes with a stratum indicator. A <Stratified Cox model> permits one <baseline hazard> for first events and another for recurrent events while retaining a common treatment coefficient. Later episodes can share their baseline; stratifying each recurrence number separately is a stronger model than the first-versus-later distinction alone.