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