Generate example subset of the OMOP CDM for estimating incidence and prevalence
mockIncidencePrevalence(
personTable = NULL,
observationPeriodTable = NULL,
targetCohortTable = NULL,
outcomeTable = NULL,
sampleSize = 1,
outPre = 1,
seed = 444,
earliestDateOfBirth = NULL,
latestDateOfBirth = NULL,
earliestObservationStartDate = as.Date("1900-01-01"),
latestObservationStartDate = as.Date("2010-01-01"),
minDaysToObservationEnd = 1,
maxDaysToObservationEnd = 4380,
minOutcomeDays = 1,
maxOutcomeDays = 10,
maxOutcomes = 1
)
A cdm reference to a duckdb database with mock data.
A tibble in the format of the person table.
A tibble in the format of the observation period table.
A tibble in the format of a cohort table which can be used for stratification
A tibble in the format of a cohort table which can be used for outcomes
The number of unique patients.
The fraction of patients with an event.
The seed for simulating the data set. Use the same seed to get same data set.
The earliest date of birth of a patient in person table.
The latest date of birth of a patient in person table.
The earliest observation start date for patient format.
The latest observation start date for patient format.
The minimum number of days of the observational integer.
The maximum number of days of the observation period integer.
The minimum number of days of the outcome period default set to 1.
The maximum number of days of the outcome period default set to 10.
The maximum possible number of outcomes per person can have default set to 1.
# \donttest{
cdm <- mockIncidencePrevalence(sampleSize = 100)
cdm
# }
Run the code above in your browser using DataLab