| runSccAnalyses | R Documentation |
Run a list of analyses
runSccAnalyses(
connectionDetails,
cdmDatabaseSchema,
tempEmulationSchema = getOption("sqlRenderTempEmulationSchema"),
exposureDatabaseSchema = cdmDatabaseSchema,
exposureTable = "drug_era",
outcomeDatabaseSchema = cdmDatabaseSchema,
outcomeTable = "condition_occurrence",
resultsFolder = "./SelfControlledCohortOutput",
sccAnalysisList,
exposureOutcomeList,
databaseId,
controlType = "outcome",
analysisThreads = 1,
computeThreads = 1
)
connectionDetails |
An R object of type |
cdmDatabaseSchema |
Name of database schema that contains the OMOP CDM and vocabulary. |
tempEmulationSchema |
Some database platforms like Oracle and Impala do not truly support temp tables. To emulate temp tables, provide a schema with write privileges where temp tables can be created. |
exposureDatabaseSchema |
The name of the database schema that is the location where the exposure data used to define the exposure cohorts is available. If exposureTable = DRUG_ERA, exposureDatabaseSchema is not used by assumed to be cdmSchema. Requires read permissions to this database. |
exposureTable |
The tablename that contains the exposure cohorts. If exposureTable <> DRUG_ERA, then expectation is exposureTable has format of COHORT table: cohort_concept_id, SUBJECT_ID, COHORT_START_DATE, COHORT_END_DATE. |
outcomeDatabaseSchema |
The name of the database schema that is the location where the data used to define the outcome cohorts is available. If exposureTable = CONDITION_ERA, exposureDatabaseSchema is not used by assumed to be cdmSchema. Requires read permissions to this database. |
outcomeTable |
The tablename that contains the outcome cohorts. If outcomeTable <> CONDITION_OCCURRENCE, then expectation is outcomeTable has format of COHORT table: COHORT_DEFINITION_ID, SUBJECT_ID, COHORT_START_DATE, COHORT_END_DATE. |
resultsFolder |
Name of the folder where all the outputs will written to. |
sccAnalysisList |
A list of objects of type |
exposureOutcomeList |
A list of objects of type |
databaseId |
Unique identifier for database - required |
controlType |
Calibrate effect estimates with outcome (default) or exposure controls |
analysisThreads |
The number of parallel threads to use to execute the analyses. |
computeThreads |
Number of parallel threads for computing IRRs with exact confidence intervals. |
Run a list of analyses for the drug-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(drugComparatorOutcomesList)'.
Invisibly returns a data frame containing a reference table for all exposure-outcome-analysis combinations executed.
if (interactive()) {
connectionDetails <- Eunomia::getEunomiaConnectionDetails()
eo1 <- createExposureOutcome(exposureId = 1124300, outcomeId = 444382)
analysis1 <- createSccAnalysis(analysisId = 1,
description = "Main analysis",
runSelfControlledCohortArgs = createRunSelfControlledCohortArgs())
results <- runSccAnalyses(
connectionDetails = connectionDetails,
cdmDatabaseSchema = "main",
exposureOutcomeList = list(eo1),
sccAnalysisList = list(analysis1),
databaseId = "Eunomia",
resultsFolder = tempdir()
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.