R/DefaultTemporalCovariateSettings.R
createTemporalCovariateSettings.Rd
Create covariate settings
createTemporalCovariateSettings(
useDemographicsGender = FALSE,
useDemographicsAge = FALSE,
useDemographicsAgeGroup = FALSE,
useDemographicsRace = FALSE,
useDemographicsEthnicity = FALSE,
useDemographicsIndexYear = FALSE,
useDemographicsIndexMonth = FALSE,
useDemographicsPriorObservationTime = FALSE,
useDemographicsPostObservationTime = FALSE,
useDemographicsTimeInCohort = FALSE,
useDemographicsIndexYearMonth = FALSE,
useCareSiteId = FALSE,
useConditionOccurrence = FALSE,
useConditionOccurrencePrimaryInpatient = FALSE,
useConditionEraStart = FALSE,
useConditionEraOverlap = FALSE,
useConditionEraGroupStart = FALSE,
useConditionEraGroupOverlap = FALSE,
useDrugExposure = FALSE,
useDrugEraStart = FALSE,
useDrugEraOverlap = FALSE,
useDrugEraGroupStart = FALSE,
useDrugEraGroupOverlap = FALSE,
useProcedureOccurrence = FALSE,
useDeviceExposure = FALSE,
useMeasurement = FALSE,
useMeasurementValue = FALSE,
useMeasurementRangeGroup = FALSE,
useMeasurementValueAsConcept = FALSE,
useObservation = FALSE,
useObservationValueAsConcept = FALSE,
useCharlsonIndex = FALSE,
useDcsi = FALSE,
useChads2 = FALSE,
useChads2Vasc = FALSE,
useHfrs = FALSE,
useDistinctConditionCount = FALSE,
useDistinctIngredientCount = FALSE,
useDistinctProcedureCount = FALSE,
useDistinctMeasurementCount = FALSE,
useDistinctObservationCount = FALSE,
useVisitCount = FALSE,
useVisitConceptCount = FALSE,
temporalStartDays = -365:-1,
temporalEndDays = -365:-1,
includedCovariateConceptIds = c(),
addDescendantsToInclude = FALSE,
excludedCovariateConceptIds = c(),
addDescendantsToExclude = FALSE,
includedCovariateIds = c()
)
Gender of the subject. (analysis ID 1)
Age of the subject on the index date (in years). (analysis ID 2)
Age of the subject on the index date (in 5 year age groups) (analysis ID 3)
Race of the subject. (analysis ID 4)
Ethnicity of the subject. (analysis ID 5)
Year of the index date. (analysis ID 6)
Month of the index date. (analysis ID 7)
Number of days of observation time preceding the index date. (analysis ID 8)
Number of days of observation time preceding the index date. (analysis ID 9)
Number of days of observation time preceding the index date. (analysis ID 10)
Calendar month of the index date. (analysis ID 11)
Care site associated with the cohort start, pulled from the visit_detail, visit_occurrence, or person table, in that order. (analysis ID 12)
One covariate per condition in the condition_occurrence table starting in the time window. (analysis ID 101)
One covariate per condition observed as a primary diagnosis in an inpatient setting in the condition_occurrence table starting in the time window. (analysis ID 102)
One covariate per condition in the condition_era table starting in the time window. (analysis ID 201)
One covariate per condition in the condition_era table overlapping with any part of the time window. (analysis ID 202)
One covariate per condition era rolled up to SNOMED groups in the condition_era table starting in the time window. (analysis ID 203)
One covariate per condition era rolled up to SNOMED groups in the condition_era table overlapping with any part of the time window. (analysis ID 204)
One covariate per drug in the drug_exposure table starting in the time window. (analysis ID 301)
One covariate per drug in the drug_era table starting in the time window. (analysis ID 401)
One covariate per drug in the drug_era table overlapping with any part of the time window. (analysis ID 402)
One covariate per drug rolled up to ATC groups in the drug_era table starting in the time window. (analysis ID 403)
One covariate per drug rolled up to ATC groups in the drug_era table overlapping with any part of the time window. (analysis ID 404)
One covariate per procedure in the procedure_occurrence table in the time window. (analysis ID 501)
One covariate per device in the device exposure table starting in the timewindow. (analysis ID 601)
One covariate per measurement in the measurement table in the time window. (analysis ID 701)
One covariate containing the value per measurement-unit combination in the time window. If multiple values are found, the last is taken. (analysis ID 702)
Covariates indicating whether measurements are below, within, or above normal range within the time period. (analysis ID 703)
One covariate per measurement-value concept combination within the time period. (analysis ID 704)
One covariate per observation in the observation table in the time window. (analysis ID 801)
One covariate per observation-value concept combination within the time period. (analysis ID 802)
The Charlson comorbidity index (Romano adaptation) using all conditions prior to the window end. (analysis ID 901)
The Diabetes Comorbidity Severity Index (DCSI) using all conditions prior to the window end. (analysis ID 902)
The CHADS2 score using all conditions prior to the window end. (analysis ID 903)
The CHADS2VASc score using all conditions prior to the window end. (analysis ID 904)
The Hospital Frailty Risk Score score using all conditions prior to the window end. (analysis ID 926)
The number of distinct condition concepts observed in the time window. (analysis ID 905)
The number of distinct ingredients observed in the time window. (analysis ID 906)
The number of distinct procedures observed in the time window. (analysis ID 907)
The number of distinct measurements observed in the time window. (analysis ID 908)
The number of distinct observations in the time window. (analysis ID 909)
The number of visits observed in the time window. (analysis ID 910)
The number of visits observed in the time window, stratified by visit concept ID. (analysis ID 911)
A list of integers representing the start of a time period, relative to the index date. 0 indicates the index date, -1 indicates the day before the index date, etc. The start day is included in the time period.
A list of integers representing the end of a time period, relative to the index date. 0 indicates the index date, -1 indicates the day before the index date, etc. The end day is included in the time period.
A list of concept IDs that should be used to construct covariates.
Should descendant concept IDs be added to the list of concepts to include?
A list of concept IDs that should NOT be used to construct covariates.
Should descendant concept IDs be added to the list of concepts to exclude?
A list of covariate IDs that should be restricted to.
An object of type covariateSettings
, to be used in other functions.
creates an object specifying how covariates should be constructed from data in the CDM model.
settings <- createTemporalCovariateSettings(
useDemographicsGender = TRUE,
useDemographicsAge = FALSE,
useDemographicsAgeGroup = TRUE,
useDemographicsRace = TRUE,
useDemographicsEthnicity = TRUE,
useDemographicsIndexYear = TRUE,
useDemographicsIndexMonth = TRUE,
useDemographicsPriorObservationTime = FALSE,
useDemographicsPostObservationTime = FALSE,
useDemographicsTimeInCohort = FALSE,
useDemographicsIndexYearMonth = FALSE,
useCareSiteId = FALSE,
useConditionOccurrence = FALSE,
useConditionOccurrencePrimaryInpatient = FALSE,
useConditionEraStart = FALSE,
useConditionEraOverlap = FALSE,
useConditionEraGroupStart = FALSE,
useConditionEraGroupOverlap = TRUE,
useDrugExposure = FALSE,
useDrugEraStart = FALSE,
useDrugEraOverlap = FALSE,
useDrugEraGroupStart = FALSE,
useDrugEraGroupOverlap = TRUE,
useProcedureOccurrence = TRUE,
useDeviceExposure = TRUE,
useMeasurement = TRUE,
useMeasurementValue = FALSE,
useMeasurementRangeGroup = TRUE,
useMeasurementValueAsConcept = TRUE,
useObservation = TRUE,
useObservationValueAsConcept = TRUE,
useCharlsonIndex = TRUE,
useDcsi = TRUE,
useChads2 = TRUE,
useChads2Vasc = TRUE,
useHfrs = FALSE,
useDistinctConditionCount = FALSE,
useDistinctIngredientCount = FALSE,
useDistinctProcedureCount = FALSE,
useDistinctMeasurementCount = FALSE,
useDistinctObservationCount = FALSE,
useVisitCount = FALSE,
useVisitConceptCount = FALSE,
temporalStartDays = -365:-1,
temporalEndDays = -365:-1,
includedCovariateConceptIds = c(),
addDescendantsToInclude = FALSE,
excludedCovariateConceptIds = c(),
addDescendantsToExclude = FALSE,
includedCovariateIds = c()
)