Runs a suite of diagnostic tests to assess the validity of SCC analysis assumptions. Version 1.6.0+ implements diagnostics aligned with SelfControlledCaseSeries package standards.
runSccDiagnostics(
connection,
cdmDatabaseSchema,
tempEmulationSchema = getOption("sqlRenderTempEmulationSchema"),
resultsTable,
riskWindowsTable,
outcomeTable = "condition_era",
outcomeDatabaseSchema = cdmDatabaseSchema,
analysisId,
databaseId,
estimates = NULL,
diagnostics = c("all"),
thresholds = getDefaultDiagnosticThresholds(),
resultExportManager
)DatabaseConnector connection instance
Name of database schema that contains OMOP CDM
Schema for temp table emulation (Oracle, Impala)
Name of the results table (contains counts)
Name of the risk windows table
Name of outcome table (e.g., "condition_era", "cohort")
Schema containing outcome table
Analysis identifier
Database identifier for results export
Data frame of raw SCC results (including rr and se_log_rr)
Character vector of diagnostics to run. Options: "all", "mdrr", "pre_exposure_gain", "event_dependent", "ease"
Named list of diagnostic thresholds (see getDefaultDiagnosticThresholds)
ResultModelManager::ResultExportManager instance
Invisible data frame of diagnostic results
if (FALSE) { # \dontrun{
connection <- DatabaseConnector::connect(connectionDetails)
diagnostics <- runSccDiagnostics(
connection = connection,
cdmDatabaseSchema = "main",
resultsTable = "#scc_results",
riskWindowsTable = "#risk_windows",
analysisId = 1,
databaseId = "Eunomia",
estimates = resultsData,
diagnostics = "all",
thresholds = getDefaultDiagnosticThresholds()
)
DatabaseConnector::disconnect(connection)
} # }