fct_surrogate_quanti {PheVis}R Documentation

fct_surrogate_quanti

Description

Compute the quantitative surrogate and then apply thresholds to get the qualitative surrogate.

Usage

fct_surrogate_quanti(
  main_icd,
  main_cui,
  df,
  half_life,
  date,
  patient_id,
  encounter_id,
  omega = 2,
  param = NULL
)

Arguments

main_icd

Character vector of the column names of the main ICD codes.

main_cui

Character vector of the column names of the main CUIs.

df

Dataframe containing all variables.

half_life

Duration of accumulation. For a chronic disease you might chose Inf, for acute disease you might chose the duration of the disease.

date

Column name of the time column. The time column should be numeric

patient_id

Column name of the patient id column.

encounter_id

Column name of the encounter id column.

omega

Constant for the extrema population definition.

param

param of a previous train_phevis() result.

Value

A list


[Package PheVis version 1.0.4 Index]