add_numerical_event: Add Event to Cohort Using Function of Numeric Variable in...

Description Usage Arguments Value Examples

View source: R/jigsaw.R

Description

Takes any numeric data in events file (e.g., laboratory value) and estimates a function of it (e.g., mean) using all available values. Values can be limited to a time window before the person's index date (from cohort file). Windows must be negative (i.e., before index date). Function parameters can be passed in ... to the function (e.g., na.rm = TRUE). Default function is mean. Other options include median, max, and min.

Usage

1
add_numerical_event(varname = NULL, days = -365, func = mean, ...)

Arguments

varname

variable name

days

size of window in days

func

function to apply to values (e.g., mean)

...

passed to function (e.g., na.rm = TRUE)

Value

see above

Examples

1
## Not run: # nothing here yet

outcomesinsights/jigsaw_r documentation built on May 24, 2019, 5:54 p.m.