execute: Execute the Study

View source: R/Main.R

executeR Documentation

Execute the Study

Description

Execute the Study

Usage

execute(
  connectionDetails,
  cdmDatabaseSchema,
  cohortDatabaseSchema = cdmDatabaseSchema,
  cohortTable = "cohort",
  cohortInclusionTable = paste0(cohortTable, "_inclusion"),
  cohortInclusionResultTable = paste0(cohortTable, "_inclusion_result"),
  cohortInclusionStatsTable = paste0(cohortTable, "_inclusion_stats"),
  cohortSummaryStatsTable = paste0(cohortTable, "_summary_stats"),
  cohortCensorStatsTable = paste0(cohortTable, "_censor_stats"),
  oracleTempSchema = NULL,
  tempEmulationSchema = getOption("sqlRenderTempEmulationSchema"),
  verifyDependencies = TRUE,
  outputFolder,
  databaseId = "Unknown",
  databaseName = "Unknown",
  databaseDescription = "Unknown",
  createCohorts = TRUE,
  synthesizePositiveControls = TRUE,
  runAnalyses = TRUE,
  packageResults = TRUE,
  maxCores = 4,
  minCellCount = 5
)

Arguments

connectionDetails

An object of type connectionDetails as created using the createConnectionDetails function in the DatabaseConnector package.

cdmDatabaseSchema

Schema name where your patient-level data in OMOP CDM format resides. Note that for SQL Server, this should include both the database and schema name, for example 'cdm_data.dbo'.

cohortDatabaseSchema

Schema name where intermediate data can be stored. You will need to have write priviliges in this schema. Note that for SQL Server, this should include both the database and schema name, for example 'cdm_data.dbo'.

cohortTable

Name of the cohort table.

cohortInclusionTable

Name of the inclusion table, one of the tables for storing inclusion rule statistics.

cohortInclusionResultTable

Name of the inclusion result table, one of the tables for storing inclusion rule statistics.

cohortInclusionStatsTable

Name of the inclusion stats table, one of the tables for storing inclusion rule statistics.

cohortSummaryStatsTable

Name of the summary stats table, one of the tables for storing inclusion rule statistics.

cohortCensorStatsTable

Name of the censor stats table, one of the tables for storing inclusion rule statistics.

oracleTempSchema

DEPRECATED: use 'tempEmulationSchema' instead.

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.

verifyDependencies

Check whether correct package versions are installed?

outputFolder

Name of local folder to place results; make sure to use forward slashes (/). Do not use a folder on a network drive since this greatly impacts performance.

databaseId

A short string for identifying the database (e.g. 'Synpuf').

databaseName

The full name of the database (e.g. 'Medicare Claims Synthetic Public Use Files (SynPUFs)').

databaseDescription

A short description (several sentences) of the database.

createCohorts

Create the cohortTable table with the exposure and outcome cohorts?

synthesizePositiveControls

Should positive controls be synthesized?

runAnalyses

Perform the cohort method analyses?

packageResults

Should results be packaged for later sharing?

maxCores

How many parallel cores should be used? If more cores are made available this can speed up the analyses.

minCellCount

The minimum number of subjects contributing to a count before it can be included in packaged results.

Details

This function executes the SkeletonComparativeEffectStudy Study.

The createCohorts, synthesizePositiveControls, runAnalyses, and runDiagnostics arguments are intended to be used to run parts of the full study at a time, but none of the parts are considered to be optional.

Examples

## Not run: 
connectionDetails <- createConnectionDetails(dbms = "postgresql",
                                             user = "joe",
                                             password = "secret",
                                             server = "myserver")

execute(connectionDetails,
        cdmDatabaseSchema = "cdm_data",
        cohortDatabaseSchema = "study_results",
        cohortTable = "cohort",
        oracleTempSchema = NULL,
        outputFolder = "c:/temp/study_results",
        maxCores = 4)

## End(Not run)


OHDSI/SkeletonComparativeEffectStudy documentation built on May 13, 2023, 12:48 p.m.