Compute the quantitative surrogate and then apply thresholds to get the qualitative surrogate.
fct_surrogate_quanti(
main_icd,
main_cui,
df,
half_life,
date,
patient_id,
encounter_id,
omega = 2,
param = NULL
)A list
table - Main result: data.frame with the rolling variables and the surrogates
param - the parameters for the standardisation of ICD and CUI
roll_all - a subset of table with the rolling variables only
quantile_vec - the quantile defining the extrema populations
Character vector of the column names of the main ICD codes.
Character vector of the column names of the main CUIs.
Dataframe containing all variables.
Duration of accumulation. For a chronic disease you might chose Inf, for acute disease you might chose the duration of the disease.
Column name of the time column. The time column should be numeric
Column name of the patient id column.
Column name of the encounter id column.
Constant for the extrema population definition.
param of a previous train_phevis() result.