Function to cumulate surrogate with exponential decay
sur_exp_smooth(half_life, sur, date, patient_id, encounter_id)A dataframe with the cumulated surrogate.
Duration of cumulation. For a chronic disease you might chose Inf, for acute disease you might chose the duration of the disease.
The quantitative surrogate.
A numeric vector of time of days unit.
Vector of patient ID
Vector of encounter ID