Characterize cohorts with the HADES Characterization Package
Source:R/Module-Characterization.R
CharacterizationModule.RdComputes cohort characterization information against the OMOP Common Data Model
Super class
Strategus::StrategusModule -> CharacterizationModule
Methods
Method execute()
Execute characterization
Usage
CharacterizationModule$execute(
connectionDetails,
analysisSpecifications,
executionSettings
)Arguments
connectionDetailsAn object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.analysisSpecificationsAn object of type
AnalysisSpecificationsas created bycreateEmptyAnalysisSpecificiations().analysisSpecificationsAn object of type
AnalysisSpecificationsas created bycreateEmptyAnalysisSpecificiations().executionSettingsAn object of type
ExecutionSettingsas created bycreateCdmExecutionSettings()orcreateResultsExecutionSettings().
Method createResultsDataModel()
Create the results data model for the module
Usage
CharacterizationModule$createResultsDataModel(
resultsConnectionDetails,
resultsDatabaseSchema,
tablePrefix = self$tablePrefix
)Arguments
resultsConnectionDetailsThe connection details to the results database which is an object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.resultsConnectionDetailsThe connection details to the results database which is an object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.resultsDatabaseSchemaThe schema in the results database that holds the results data model.
tablePrefixA prefix to apply to the database table names (optional).
tablePrefixA prefix to apply to the database table names (optional).
Method uploadResults()
Upload the results for the module
Usage
CharacterizationModule$uploadResults(
resultsConnectionDetails,
analysisSpecifications,
resultsDataModelSettings
)Arguments
resultsConnectionDetailsThe connection details to the results database which is an object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.resultsConnectionDetailsThe connection details to the results database which is an object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.analysisSpecificationsAn object of type
AnalysisSpecificationsas created bycreateEmptyAnalysisSpecificiations().analysisSpecificationsAn object of type
AnalysisSpecificationsas created bycreateEmptyAnalysisSpecificiations().resultsDataModelSettingsThe results data model settings as created using [@seealso
createResultsDataModelSettings()]
Method createModuleSpecifications()
Creates the CharacterizationModule Specifications
Usage
CharacterizationModule$createModuleSpecifications(
targetIds,
limitToFirstInNDays = rep(99999, length(targetIds)),
minPriorObservation = 365,
outcomeIds,
outcomeWashoutDays = c(365),
riskWindowStart = c(1, 1),
startAnchor = c("cohort start", "cohort start"),
riskWindowEnd = c(0, 365),
endAnchor = c("cohort end", "cohort end"),
dechallengeStopInterval = 30,
dechallengeEvaluationWindow = 30,
mode = "CohortIncidence",
minSMD = 0.01,
minCharacterizationMean = 0.01,
minCovariateCount = 5,
covariateSettings = FeatureExtraction::createCovariateSettings(useDemographicsGender =
T, useDemographicsAge = T, useDemographicsAgeGroup = T, useDemographicsRace = T,
useDemographicsEthnicity = T, useDemographicsIndexYear = T, useDemographicsIndexMonth
= T, useDemographicsTimeInCohort = T, useDemographicsPriorObservationTime = T,
useDemographicsPostObservationTime = T, useConditionGroupEraLongTerm = T,
useDrugGroupEraOverlapping = T, useDrugGroupEraLongTerm = T,
useProcedureOccurrenceLongTerm = T, useMeasurementLongTerm = T,
useObservationLongTerm = T, useDeviceExposureLongTerm = T,
useVisitConceptCountLongTerm = T, useConditionGroupEraShortTerm = T,
useDrugGroupEraShortTerm = T, useProcedureOccurrenceShortTerm = T,
useMeasurementShortTerm = T, useObservationShortTerm = T, useDeviceExposureShortTerm
= T, useVisitConceptCountShortTerm = T, endDays = 0, longTermStartDays = -365,
shortTermStartDays = -30),
caseCovariateSettings =
Characterization::createDuringCovariateSettings(useConditionGroupEraDuring = T,
useDrugGroupEraDuring = T, useProcedureOccurrenceDuring = T, useDeviceExposureDuring
= T, useMeasurementDuring = T, useObservationDuring = T, useVisitConceptCountDuring =
T),
casePreTargetDuration = 365,
casePostOutcomeDuration = 365,
includeTimeToEvent = TRUE,
includeDechallengeRechallenge = TRUE,
includeTargetBaseline = TRUE,
includeRiskFactors = TRUE,
includeCaseSeries = TRUE,
outputTable = "characterization_cohorts"
)Arguments
targetIdsA vector of cohort IDs to use as the target(s) for the characterization
limitToFirstInNDaysA vector of number of days of minimum between target exposures for each target (same length as the targetIds) - use 99999 to restrict to first exposure per person in target cohort
minPriorObservationThe number of days of minimum observation a patient in the target populations must have
outcomeIdsA vector of cohort IDs to use as the outcome(s) for the characterization
outcomeWashoutDaysA vector of integers specifying the washout days for each outcome (same length as the outcomeIds)
riskWindowStartThe number of days after start anchor to start the time-at-risk (can be a vector for multiple TARS)
startAnchorThe TAR starts relative to this either cohort start or cohort end (can be a vector for multiple TARS)
riskWindowEndThe number of days after end anchor to end the time-at-risk (can be a vector for multiple TARS)
endAnchorThe TAR ends relative to this either cohort start or cohort end (can be a vector for multiple TARS)
dechallengeStopIntervaldescription
dechallengeEvaluationWindowdescription
modePick one of 'CohortIncidence'/'Efficient'/'PatientLevelPrediction' to specify how the non-cases are defined
minSMDThe minimum standardized mean difference for the risk factors analysis
minCharacterizationMeanThe minimum fraction patients in the target have a covariate for it to be included
minCovariateCountThe minimum number of patients in the analysis to have a covariate for it to be included
covariateSettingsCovariates for the database, cohort and risk factor characterization
caseCovariateSettingsCovariates for the case-series characterization
casePreTargetDurationThe number of days before target start to use for case-series
casePostOutcomeDurationThe number of days after outcome start to use for case-series
includeTimeToEventLets you skip running a time to event analyses when set to FALSE
includeDechallengeRechallengeLets you skip running a dechallenge-rechallenge analyses when set to FALSE
includeTargetBaselineLets you skip running the target baseline analyses when set to FALSE
includeRiskFactorsLets you skip running the risk factor analyses when set to FALSE
includeCaseSeriesLets you skip running the case series analyses when set to FALSE
outputTableThe table used by characterization to create the cohorts used in characterization (included targets, cases, non-cases, etc.). The spec hash and database hash are added to this name to make it unique per run.