Analysis of Marked Recurrent Events in the Presence of a Terminating Event.