- cdm
A CDM reference object
- name
Name of the cohort table to be created. Note if a table already
exists with this name in the database (give the prefix being used for the
cdm reference) it will be overwritten.
- cohortDateRange
Two dates. The first indicating the earliest cohort
start date and the second indicating the latest possible cohort end date. If
NULL or the first date is set as missing, the earliest observation_start_date
in the observation_period table will be used for the former. If NULL or the
second date is set as missing, the latest observation_end_date in the
observation_period table will be used for the latter.
- ageGroup
A list of age groups for which cohorts will be generated. A
value of list(c(0,17), c(18,30))
would, for example, lead to the creation
of cohorts for those aged from 0 to 17, and from 18 to 30. In this example
an individual turning 18 during the time period would appear in both
cohorts (leaving the first cohort the day before their 18th birthday and
entering the second from the day of their 18th birthday).
- sex
Sex of the cohorts. This can be one or more of: "Male"
,
"Female"
, or "Both"
.
- daysPriorObservation
The number of days of prior observation observed in
the database required for an individual to start contributing time in
a cohort.
- requirementInteractions
If TRUE, cohorts will be created for
all combinations of ageGroup, sex, and daysPriorObservation. If FALSE, only the
first value specified for the other factors will be used. Consequently,
order of values matters when requirementInteractions is FALSE.