demographicsCohort {CohortConstructor} | R Documentation |
Create cohorts based on patient demographics
Description
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.
Usage
demographicsCohort(
cdm,
name,
ageRange = NULL,
sex = NULL,
minPriorObservation = NULL,
minFutureObservation = NULL
)
Arguments
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. |
Value
A cohort table
Examples
library(CohortConstructor)
cdm <- mockCohortConstructor()
cohort <- cdm |> demographicsCohort(name = "cohort3", ageRange = c(18,40), sex = "Male")
attrition(cohort)
[Package CohortConstructor version 0.2.1 Index]