OHDSI Home | Forums | Wiki | Github

What is the default covariate setting in FeatureExtraction

Hi OHDSI researchers,

I have been using the CohortMethod package to do population-level estimation. One of the step is to create covariates settings using the FeatureExtraction package. I want to know what type of covariates are included in the createDefaultCovariateSettings() function. The function including the arguments looks like below. Where can i find more information about this function or lower level functions it calls? For example, i want to know whether it uses long/short/medium term, drug era/drug group, measurement/measurement range/measurement value, and etc.

createDefaultCovariateSettings(
includedCovariateConceptIds = c(),
addDescendantsToInclude = FALSE,
excludedCovariateConceptIds = c(),
addDescendantsToExclude = FALSE,
includedCovariateIds = c()
)

Thank you for your help!
Linying

You could look at the output of the createDefaultCovariateSettings() function:

createDefaultCovariateSettings()
$temporal
[1] FALSE

$DemographicsGender
[1] TRUE

$DemographicsAgeGroup
[1] TRUE

$DemographicsRace
[1] TRUE

$DemographicsEthnicity
[1] TRUE

$DemographicsIndexYear
[1] TRUE

$DemographicsIndexMonth
[1] TRUE

$ConditionGroupEraLongTerm
[1] TRUE

$ConditionGroupEraShortTerm
[1] TRUE

$DrugGroupEraLongTerm
[1] TRUE

$DrugGroupEraShortTerm
[1] TRUE

$DrugGroupEraOverlapping
[1] TRUE

$ProcedureOccurrenceLongTerm
[1] TRUE

$ProcedureOccurrenceShortTerm
[1] TRUE

$DeviceExposureLongTerm
[1] TRUE

$DeviceExposureShortTerm
[1] TRUE

$MeasurementLongTerm
[1] TRUE

$MeasurementShortTerm
[1] TRUE

$MeasurementRangeGroupLongTerm
[1] TRUE

$ObservationLongTerm
[1] TRUE

$ObservationShortTerm
[1] TRUE

$CharlsonIndex
[1] TRUE

$Dcsi
[1] TRUE

$Chads2
[1] TRUE

$Chads2Vasc
[1] TRUE

$includedCovariateConceptIds
logical(0)

$includedCovariateIds
logical(0)

$addDescendantsToInclude
[1] FALSE

$excludedCovariateConceptIds
logical(0)

$addDescendantsToExclude
[1] FALSE

$shortTermStartDays
[1] -30

$mediumTermStartDays
[1] -180

$endDays
[1] 0

$longTermStartDays
[1] -365

attr(,"fun")
[1] "getDbDefaultCovariateData"
attr(,"class")
[1] "covariateSettings"

There’s a short description of each analysis (e.g. ‘ObservationLongTerm’) in the documentation of the createCovariateSettings() function.

If you really want to dive all the way into the bowels of FeatureExtraction, you can look at the CSV file specifying the analyses, and look at those rows with TRUE in the ‘isDefault’ column. This CSV file further references the template SQL files in the sql folder. But be warned, because the SQL is very hard to read because it serves many use cases (aggregated or not, temporal or not).

t