R/AdditionalCovariates.R
createCohortCovariateSettings.Rd
Extracts covariates based on cohorts
createCohortCovariateSettings(
cohortName,
settingId,
cohortDatabaseSchema,
cohortTable,
cohortId,
startDay = -30,
endDay = 0,
count = F,
ageInteraction = F,
lnAgeInteraction = F,
analysisId = 456
)
Name for the cohort
A unique id for the covariate time and
The schema of the database with the cohort
the table name that contains the covariate cohort
cohort id for the covariate cohort
The number of days prior to index to start observing the cohort
The number of days prior to index to stop observing the cohort
If FALSE the covariate value is binary (1 means cohort occurred between index+startDay and index+endDay, 0 means it did not) If TRUE then the covariate value is the number of unique cohort_start_dates between index+startDay and index+endDay
If TRUE multiple covariate value by the patient's age in years
If TRUE multiple covariate value by the log of the patient's age in years
The analysisId for the covariate
An object of class covariateSettings specifying how to create the cohort covariate with the covariateId cohortId x 100000 + settingId x 1000 + analysisId
The user specifies a cohort and time period and then a covariate is constructed whether they are in the cohort during the time periods relative to target population cohort index