I'm working with longitudinal data for a series of patients. Duration of followup on a patient-level is non-uniform.
Patients can either experience a discrete event (e.g., a heart attack) or never experience the event. This feature is of course binary. Additionally, patients that have experienced an event (e.g., the first heart attack) can also continue to experience more events (e.g., subsequent heart attacks). Each event is anchored to an event date which will be compared to when the patient was diagnosed with their primary, chronic condition (e.g., multiple myeloma).
I'd like to append to my dataset a derived column - TimeSinceLastEvent. Derivation of this value for first events would be calculated by (FirstEventDate - DiagnosisDate)/365 and subsequent events would be calculated by (SecondEventDate - FirstEventDate)/365, (ThirdEventDate - SecondEventDate)/365, etc.
How should I code this derived column for patients that never experience the event? I can't insert NA/NaN for these patients because downstream analyses require non-NA and finite data; so they would be imputed incorrectly anyway. One thought I had was setting these values to something drastically different, but standardized, such as -1 or 9999. Is this a valid and reasonable approach? If not, what have you used?