#' @description
process_covariates
processes covariates data
process_covariates(covariates, df_drug_obsperiod, european = 0, ...)
covariates | A tibble with columns, c('person_id','dob','gender_concept_id','race_concept_id') |
---|---|
df_drug_obsperiod | A tibble with columns, c('person_id','start_date','first_drug_exposure','final_end_date') |
european | A binary value with 1 = only use european ancestry, and 0 = use entire cohort. |
This function processes covariates data. It calculates age start start of observation period, keeps only adult patients (between 18 and 90 years at start of observation period), and default value is to use all patients regardless of ancestry.
Updated: 2021-03-27