sur_exp_smooth {PheVis}R Documentation

sur_exp_smooth

Description

Function to cumulate surrogate with exponential decay

Usage

sur_exp_smooth(half_life, sur, date, patient_id, encounter_id)

Arguments

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

Value

A dataframe with the cumulated surrogate.


[Package PheVis version 1.0.4 Index]