New-user cohort studies with the HADES CohortMethod Package
Source:R/Module-CohortMethod.R
CohortMethodModule.RdModule for performing new-user cohort studies against the OMOP Common Data Model
Super class
Strategus::StrategusModule -> CohortMethodModule
Methods
Method execute()
Executes the CohortMethod package
Arguments
connectionDetailsAn object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.analysisSpecificationsThe analysis specifications for the study
executionSettingsAn object of type
ExecutionSettingsas created bycreateCdmExecutionSettings()orcreateResultsExecutionSettings().
Method createResultsDataModel()
Create the results data model for the module
Usage
CohortMethodModule$createResultsDataModel(
resultsConnectionDetails,
resultsDatabaseSchema,
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
CohortMethodModule$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().resultsDataModelSettingsThe results data model settings as created using [@seealso
createResultsDataModelSettings()]
Method createModuleSpecifications()
Creates the CohortMethod Module Specifications
Usage
CohortMethodModule$createModuleSpecifications(
cmAnalysesSpecifications,
cmAnalysisList = NULL,
targetComparatorOutcomesList = NULL,
analysesToExclude = NULL,
refitPsForEveryOutcome = NULL,
refitPsForEveryStudyPopulation = NULL,
cmDiagnosticThresholds = NULL
)Arguments
cmAnalysesSpecificationsAn R6 class created by CohortMethod::createCmAnalysesSpecifications
cmAnalysisListDeprecated with CohortMethod v6 - please use the
cmAnalysesSpecificationsparameter instead.targetComparatorOutcomesListDeprecated with CohortMethod v6 - please use the
cmAnalysesSpecificationsparameter instead.analysesToExcludeDeprecated with CohortMethod v6 - please use the
cmAnalysesSpecificationsparameter instead.refitPsForEveryOutcomeDeprecated with CohortMethod v6 - please use the
cmAnalysesSpecificationsparameter instead.refitPsForEveryStudyPopulationDeprecated with CohortMethod v6 - please use the
cmAnalysesSpecificationsparameter instead.cmDiagnosticThresholdsDeprecated with CohortMethod v6 - please use the
cmAnalysesSpecificationsparameter instead.
Details
Run a list of analyses for the target-comparator-outcomes of interest. This function will run all
specified analyses against all hypotheses of interest, meaning that the total number of outcome
models is length(cmAnalysisList) * length(targetComparatorOutcomesList) (if all analyses specify an
outcome model should be fitted). When you provide several analyses it will determine whether any of
the analyses have anything in common, and will take advantage of this fact. For example, if we
specify several analyses that only differ in the way the outcome model is fitted, then this
function will extract the data and fit the propensity model only once, and re-use this in all the
analysis.
After completion, a tibble containing references to all generated files can be obtained using the
CohortMethod::getFileReference() function. A summary of the analysis results can be obtained using the
CohortMethod::getResultsSummary() function.
Analyses to Exclude
Normally, runCmAnalyses will run all combinations of target-comparator-outcome-analyses settings.
However, sometimes we may not need all those combinations. Using the analysesToExclude argument,
we can remove certain items from the full matrix. This argument should be a data frame with at least
one of the following columns: