case_control: case_control

Description Usage Arguments Value Examples

Description

The main case control function to run a case control analysis from i2b2-generated data files

Usage

1
2
3
case_control(p, d, dict, exposure_cds, visit_cd = "V", outcome_cd = "O",
  riskWindow_daysPreIndex_start = 365, riskWindow_daysPreIndex_end = 1,
  controls_num = 3)

Arguments

p

A data frame of patients demographics

d

A data frame of patient data in a tall file

dict

A data frame of descriptions for each concept_cd in the data_tbl

exposure_cds

A string vector of exposures codes to test

visit_cd

The code used for visits (default is V)

outcome_cd

The code used for the outcome in the data_tbl (default is O)

riskWindow_daysPreIndex_start

The number of days prior to the index date to start the risk window (default is 365)

riskWindow_daysPreIndex_end

The number of days prior to the index date to end the risk window (default is 1)

controls_num

Number of controls to match to each case

Value

A list with the elements

result

A data frame with results including a row for each defined exposure

match_results

A list returned from the matching function

cohort_file

The full patient data frame with case control status after matching

Examples

1
#Not run

vcastro/Ri2b2casecontrol documentation built on May 29, 2019, 11:57 a.m.