Characterize cohorts with the HADES Characterization Package
Source:R/Module-Characterization.R
CharacterizationModule.Rd
Computes 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
connectionDetails
An object of class
connectionDetails
as created by theDatabaseConnector::createConnectionDetails()
function.analysisSpecifications
An object of type
AnalysisSpecifications
as created bycreateEmptyAnalysisSpecificiations()
.analysisSpecifications
An object of type
AnalysisSpecifications
as created bycreateEmptyAnalysisSpecificiations()
.executionSettings
An object of type
ExecutionSettings
as created bycreateCdmExecutionSettings()
orcreateResultsExecutionSettings()
.
Method createResultsDataModel()
Create the results data model for the module
Usage
CharacterizationModule$createResultsDataModel(
resultsConnectionDetails,
resultsDatabaseSchema,
tablePrefix = self$tablePrefix
)
Arguments
resultsConnectionDetails
The connection details to the results database which is an object of class
connectionDetails
as created by theDatabaseConnector::createConnectionDetails()
function.resultsConnectionDetails
The connection details to the results database which is an object of class
connectionDetails
as created by theDatabaseConnector::createConnectionDetails()
function.resultsDatabaseSchema
The schema in the results database that holds the results data model.
tablePrefix
A prefix to apply to the database table names (optional).
tablePrefix
A prefix to apply to the database table names (optional).
Method uploadResults()
Upload the results for the module
Usage
CharacterizationModule$uploadResults(
resultsConnectionDetails,
analysisSpecifications,
resultsDataModelSettings
)
Arguments
resultsConnectionDetails
The connection details to the results database which is an object of class
connectionDetails
as created by theDatabaseConnector::createConnectionDetails()
function.resultsConnectionDetails
The connection details to the results database which is an object of class
connectionDetails
as created by theDatabaseConnector::createConnectionDetails()
function.analysisSpecifications
An object of type
AnalysisSpecifications
as created bycreateEmptyAnalysisSpecificiations()
.analysisSpecifications
An object of type
AnalysisSpecifications
as created bycreateEmptyAnalysisSpecificiations()
.resultsDataModelSettings
The 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
)
Arguments
targetIds
A vector of cohort IDs to use as the target(s) for the characterization
outcomeIds
A vector of cohort IDs to use as the outcome(s) for the characterization
outcomeWashoutDays
A vector of integers specifying the washout days for each outcome (same length as the outcomeIds)
minPriorObservation
The number of days of minimum observation a patient in the target populations must have
dechallengeStopInterval
description
dechallengeEvaluationWindow
description
riskWindowStart
The number of days after start anchor to start the time-at-risk (can be a vector for multiple TARS)
startAnchor
The TAR starts relative to this either cohort start or cohort end (can be a vector for multiple TARS)
riskWindowEnd
The number of days after end anchor to end the time-at-risk (can be a vector for multiple TARS)
endAnchor
The TAR ends relative to this either cohort start or cohort end (can be a vector for multiple TARS)
minCharacterizationMean
The minimum fraction patients in the target have a covariate for it to be included
covariateSettings
Covariates for the database, cohort and risk factor characterization
caseCovariateSettings
Covariates for the case-series characterization
casePreTargetDuration
The number of days before target start to use for case-series
casePostOutcomeDuration
The number of days after outcome start to use for case-series