add_categorical_event: Create Classification Variable Based On Window

Description Usage Arguments Value Examples

Description

Takes a categorical (string) variable in the events file and classifies a person based on all available values in a window of time before the person's index date (from cohort file). Windows must be negative (i.e., before index date). This is useful for identifying whether a value has occurred in a window of time. For example, was the person classified as a smoker during the last 3 years?

Usage

1
add_categorical_event(varname = NULL, check_value = NULL, days = -365)

Arguments

varname

event name to check for values

check_value

The character value or vector to compare against (e.g. c("yes", "maybe"))

days

Size of window before the index date (from cohort file) in days

Value

see above

Examples

1
## Not run: # nothing here yet

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