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