Skip to contents

Create a parameter object for the function getDbCohortMethodData

Usage

createGetCmDataArgs(
  studyStartDate = "",
  studyEndDate = "",
  excludeDrugsFromCovariates = TRUE,
  firstExposureOnly = FALSE,
  removeDuplicateSubjects = FALSE,
  restrictToCommonPeriod = FALSE,
  washoutPeriod = 0,
  maxCohortSize = 0
)

Arguments

studyStartDate

A calendar date specifying the minimum date that a cohort index date can appear. Date format is 'yyyymmdd'.

studyEndDate

A calendar date specifying the maximum date that a cohort index date can appear. Date format is 'yyyymmdd'. Important: the study end data is also used to truncate risk windows, meaning no outcomes beyond the study end date will be considered.

excludeDrugsFromCovariates

Should the target and comparator drugs (and their descendant concepts) be excluded from the covariates? Note that this will work if the drugs are actualy drug concept IDs (and not cohortIDs).

firstExposureOnly

Should only the first exposure per subject be included? Note that this is typically done in the createStudyPopulationfunction, but can already be done here for efficiency reasons.

removeDuplicateSubjects

Remove subjects that are in both the target and comparator cohort? See details for allowed values.Note that this is typically done in the createStudyPopulation function, but can already be done here for efficiency reasons.

restrictToCommonPeriod

Restrict the analysis to the period when both treatments are observed?

washoutPeriod

The mininum required continuous observation time prior to index date for a person to be included in the cohort. Note that thisis typically done in the createStudyPopulation function, but can already be done here for efficiency reasons.

maxCohortSize

If either the target or the comparator cohort is larger than this number it will be sampled to this size. maxCohortSize = 0 indicates no maximum size.

Details

Create an object defining the parameter values.