Function to accumulate the information with exponential decay.
matrix_exp_smooth(half_life, df, date, patient_id, encounter_id)A data.frame object with both the raw variables and the accumulated ones.
Duration of accumulation. For a chronic disease you might chose Inf, for acute disease you might chose the duration of the disease.
Dataframe of the explanatory variables.
Vector of date. The date should be in a numeric format.
The vector of patient id
The vector of visit id