createSelfControlledCohortModuleSpecifications: Create Self-Controlled Cohort Module Specifications

View source: R/StrategusModuleFunctions.R

createSelfControlledCohortModuleSpecificationsR Documentation

Create Self-Controlled Cohort Module Specifications

Description

Creates a specifications object for the Self-Controlled Cohort module to be used within the OHDSI Strategus framework.

Usage

createSelfControlledCohortModuleSpecifications(
  analysisSettings,
  exposureOutcomeList,
  computeThreads = parallel::detectCores() - 1
)

Arguments

analysisSettings

A list of analysis settings containing the analysis configuration and parameters for self-controlled cohort analyses.

exposureOutcomeList

A list of objects of type exposureOutcome as created using the createExposureOutcome function. Each object defines an exposure-outcome pair with exposureId, outcomeId, and optionally trueEffectSize (set to 1 for negative controls).

computeThreads

Integer specifying the number of threads to use for parallel computation. Default is the number of available cores minus 1.

Value

A list object of class 'SelfControlledCohortModuleSpecifications' and 'ModuleSpecifications' containing the module name, version, repository information, and analysis settings.

Examples


if (interactive()) {
eo1 <- createExposureOutcome(exposureId = 1124300, outcomeId = 444382)
analysis1 <- createSccAnalysis(analysisId = 1,
                              description = "Main",
                              runSelfControlledCohortArgs = createRunSelfControlledCohortArgs())

moduleSpec <- createSelfControlledCohortModuleSpecifications(
  analysisSettings = list(analysis1),
  exposureOutcomeList = list(eo1)
)
}


SelfControlledCohort documentation built on June 17, 2026, 5:07 p.m.