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,
outcomeIds,
outcomeWashoutDays = c(365),
minPriorObservation = 365,
dechallengeStopInterval = 30,
dechallengeEvaluationWindow = 30,
riskWindowStart = c(1, 1),
startAnchor = c("cohort start", "cohort start"),
riskWindowEnd = c(0, 365),
endAnchor = c("cohort end", "cohort end"),
minCharacterizationMean = 0.01,
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,
includeAggregateCovariate = TRUE
)Arguments
targetIdsA vector of cohort IDs to use as the target(s) for the characterization
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)
minPriorObservationThe number of days of minimum observation a patient in the target populations must have
dechallengeStopIntervaldescription
dechallengeEvaluationWindowdescription
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)
minCharacterizationMeanThe minimum fraction patients in the target 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
includeAggregateCovariateLets you skip running the aggregate covariate analyses when set to FALSE