Create a SelfControlledCohort analysis specification

createSccAnalysis(
  analysisId = 1,
  description = "",
  exposureType = NULL,
  outcomeType = NULL,
  runSelfControlledCohortArgs,
  controlType = "outcome",
  runDiagnostics = TRUE,
  diagnostics = c("all"),
  diagnosticThresholds = getDefaultDiagnosticThresholds()
)

Arguments

analysisId

An integer that will be used later to refer to this specific set of analysis choices.

description

A short description of the analysis.

exposureType

If more than one exposure is provided for each exposureOutcome, this field should be used to select the specific exposure to use in this analysis.

outcomeType

If more than one outcome is provided for each exposureOutcome, this field should be used to select the specific outcome to use in this analysis.

runSelfControlledCohortArgs

An object representing the arguments to be used when calling the runSelfControlledCohort function.

controlType

Character string specifying the type of control. Options are "outcome" or "exposure". Default is "outcome".

runDiagnostics

Logical indicating whether to run diagnostic tests on the results. Default is TRUE.

diagnostics

Character vector specifying which diagnostics to run. Options: "all", "counts", "event_dependent", "pre_exposure", "window_balance", "cohort_stability". Default is "all".

diagnosticThresholds

Named list of diagnostic thresholds. See getDefaultDiagnosticThresholds() for defaults.

Value

An object of class sccAnalysis containing the analysis specifications.

Details

Create a set of analysis choices, to be used with the runSccAnalyses function.

Examples

# Create SCC analysis with default risk window settings
sccArgs <- createRunSelfControlledCohortArgs(riskWindowStartExposed = 1,
                                              riskWindowEndExposed = 30)

analysis1 <- createSccAnalysis(analysisId = 1,
                              description = "30-day exposed risk window",
                              runSelfControlledCohortArgs = sccArgs)