demographicsCohort {CohortConstructor} | R Documentation |
demographicsCohort()
creates a cohort table based on patient
characteristics. If and when an individual satisfies all the criteria they
enter the cohort. When they stop satisfying any of the criteria their
cohort entry ends.
demographicsCohort(
cdm,
name,
ageRange = NULL,
sex = NULL,
minPriorObservation = NULL,
minFutureObservation = NULL
)
cdm |
A cdm reference. |
name |
Name of the new cohort table |
ageRange |
A list of vectors specifying minimum and maximum age. |
sex |
Can be "Both", "Male" or "Female". |
minPriorObservation |
A minimum number of prior observation days in the database. |
minFutureObservation |
A minimum number of future observation days in the database. |
A cohort table
library(CohortConstructor)
cdm <- mockCohortConstructor()
cohort <- cdm |> demographicsCohort(name = "cohort3", ageRange = c(18,40), sex = "Male")
attrition(cohort)