Learn R Programming

rEHR (version 1.0)

prev_terms: This function adds columns enabling one to calculate numerators and denominators for prevalence and incidence.

Description

See the vignette for more details.

Usage

prev_terms(dat, event_date = "eventdate", year_fn = standard_years)

Arguments

dat
dataframe of longitudinal data
event_date
character name of the column used to identify clinical events
year_fn
function that determines how year start and end dates are calculated

Value

longitudinal data frame with incidence, prevalence and followup columns