Skip to contents

`r lifecycle::badge("experimental")`

Usage

addLargeScaleCharacteristics(
  cohort,
  window = list(c(0, Inf)),
  eventInWindow = NULL,
  episodeInWindow = NULL,
  indexDate = "cohort_start_date",
  censorDate = NULL,
  minimumFrequency = 0.005,
  excludedCodes = NULL
)

Arguments

cohort

The cohort to characterise.

window

Temporal windows that we want to characterize.

eventInWindow

Tables to characterise the events in the window.

episodeInWindow

Tables to characterise the episodes in the window.

indexDate

Variable in x that contains the date to compute the intersection.

censorDate

whether to censor overlap events at a specific date or a column date of x.

minimumFrequency

Minimum frequency covariates to report.

excludedCodes

Codes excluded.

Value

The output of this function is the cohort with the new created columns.

Examples

# \donttest{
library(PatientProfiles)
cdm <- PatientProfiles::mockPatientProfiles()
results <- cdm$cohort2 %>%
  addLargeScaleCharacteristics(
  episodeInWindow = c("condition_occurrence"),
  minimumFrequency = 0
  )
CDMConnector::cdmDisconnect(cdm = cdm)
# }