createRunSelfControlledCohortArgs: Create a parameter object for the function...

View source: R/CreateArgFunctions.R

createRunSelfControlledCohortArgsR Documentation

Create a parameter object for the function runSelfControlledCohort

Description

Create a parameter object for the function runSelfControlledCohort

Usage

createRunSelfControlledCohortArgs(
  firstExposureOnly = TRUE,
  firstOutcomeOnly = TRUE,
  minAge = "",
  maxAge = "",
  studyStartDate = "",
  studyEndDate = "",
  addLengthOfExposureExposed = TRUE,
  riskWindowStartExposed = 1,
  riskWindowEndExposed = 30,
  addLengthOfExposureUnexposed = TRUE,
  riskWindowEndUnexposed = -1,
  riskWindowStartUnexposed = -30,
  hasFullTimeAtRisk = FALSE,
  washoutPeriod = 0,
  followupPeriod = 0,
  computeTarDistribution = FALSE
)

Arguments

firstExposureOnly

If TRUE, only use first occurrence of each drug concept idfor each person

firstOutcomeOnly

If TRUE, only use first occurrence of each condition conceptid for each person.

minAge

Integer for minimum allowable age.

maxAge

Integer for maximum allowable age.

studyStartDate

Date for minimum allowable data for index exposure. Dateformat is 'yyyymmdd'.

studyEndDate

Date for maximum allowable data for index exposure. Dateformat is 'yyyymmdd'.

addLengthOfExposureExposed

If TRUE, use the duration from drugEraStart -> drugEraEnd as part of timeAtRisk.

riskWindowStartExposed

Integer of days to add to drugEraStart for start oftimeAtRisk (0 to include index date, 1 to start the dayafter).

riskWindowEndExposed

Additional window to add to end of exposure period (ifaddLengthOfExposureExposed = TRUE, then add to exposure enddate, else add to exposure start date).

addLengthOfExposureUnexposed

If TRUE, use the duration from exposure start -> exposureend as part of timeAtRisk looking back before exposurestart.

riskWindowEndUnexposed

Integer of days to add to exposure start for end oftimeAtRisk (0 to include index date, -1 to end the daybefore).

riskWindowStartUnexposed

Additional window to add to start of exposure period (ifaddLengthOfExposureUnexposed = TRUE, then add to exposureend date, else add to exposure start date).

hasFullTimeAtRisk

If TRUE, restrict to people who have full time-at-riskexposed and unexposed.

washoutPeriod

Integer to define required time observed before exposurestart.

followupPeriod

Integer to define required time observed after exposurestart.

computeTarDistribution

If TRUE, computer the distribution of time-at-risk and average absolute time between treatment and outcome. Note, may add significant computation time on some database engines. If set true in one analysis will default to true for all others.

Details

Create an object defining the parameter values.


OHDSI/SelfControlledCohort documentation built on Feb. 22, 2023, 5:44 p.m.