execute: Execute the Study

Description Usage Arguments Details Examples

View source: R/Main.R

Description

Execute the Study

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
execute(
  connectionDetails,
  cdmDatabaseSchema,
  cdmDatabaseName = "friendly database name",
  cohortDatabaseSchema = cdmDatabaseSchema,
  cohortTable = "cohort",
  oracleTempSchema = cohortDatabaseSchema,
  outputFolder,
  createProtocol = F,
  createCohorts = F,
  runDiagnostic = F,
  viewDiagnostic = F,
  runAnalyses = F,
  createResultsDoc = F,
  createValidationPackage = F,
  saveModelsToJson = T,
  skeletonVersion = "v0.0.1",
  analysesToValidate = NULL,
  packageResults = F,
  minCellCount = 5,
  createShiny = F,
  createJournalDocument = F,
  analysisIdDocument = 1,
  onlyFetchData = F,
  sampleSize = NULL,
  verbosity = "INFO",
  cdmVersion = 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'.

cdmDatabaseName

Shareable name of the database

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

The name of the table that will be created in the work database schema. This table will hold the target population cohorts used in this study.

oracleTempSchema

Should be used in Oracle to specify a schema where the user has write priviliges for storing temporary tables.

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.

createProtocol

Creates a protocol based on the analyses specification

createCohorts

Create the cohortTable table with the target population and outcome cohorts?

runDiagnostic

Runs a diagnostic of the T, O and tar settings for the cdmDatabaseSchema - can be used to check whether to change settings or whether the prediction may not do well.

viewDiagnostic

Opens a shiny app with the diagnostic results (run after runDiagnostic completes)

runAnalyses

Run the model development

createResultsDoc

Create a document containing the results of each prediction

createValidationPackage

Create a package for sharing the models

saveModelsToJson

Whether to save the models as json for validation (not all models are supported)

skeletonVersion

The version of the validation skeleton to use

analysesToValidate

A vector of analysis ids (e.g., c(1,3,10)) specifying which analysese to export into validation package. Default is NULL and all are exported.

packageResults

Should results be packaged for later sharing?

minCellCount

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

createShiny

Create a shiny app with the results

createJournalDocument

Do you want to create a template journal document populated with results?

analysisIdDocument

Which Analysis_id do you want to create the document for?

onlyFetchData

Only fetch data for the analyses without fitting models. Setting this flag will overwrite your input provided to the runAnalyses and createCohorts parameters.

sampleSize

The number of patients in the target cohort to sample (if NULL uses all patients)

verbosity

Sets the level of the verbosity. If the log level is at or higher in priority than the logger threshold, a message will print. The levels are:

  • DEBUGHighest verbosity showing all debug statements

  • TRACEShowing information about start and end of steps

  • INFOShow informative information (Default)

  • WARNShow warning messages

  • ERRORShow error messages

  • FATALBe silent except for fatal errors

cdmVersion

The version of the common data model

Details

This function executes the CovCoagEmaPrediction Study.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
## Not run: 
connectionDetails <- createConnectionDetails(dbms = "postgresql",
                                             user = "joe",
                                             password = "secret",
                                             server = "myserver")

execute(connectionDetails,
        cdmDatabaseSchema = "cdm_data",
        cdmDatabaseName = 'shareable name of the database'
        cohortDatabaseSchema = "study_results",
        cohortTable = "cohort",
        oracleTempSchema = NULL,
        outputFolder = "c:/temp/study_results", 
        createProtocol = T,
        createCohorts = T,
        runDiagnostic = F,
        viewDiagnostic = F,
        runAnalyses = T,
        createResultsDoc = T,
        createValidationPackage = T,
        saveModelsToJson = T,
        skeletonVersion = 'v1.0.1',
        packageResults = F,
        minCellCount = 5,
        createShiny = F,
        sampleSize = 10000,
        verbosity = "INFO",
        cdmVersion = 5)

## End(Not run)

mi-erasmusmc/CovCoagEmaPrediction documentation built on Dec. 21, 2021, 5:54 p.m.