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
execute(
  connectionDetails,
  cdmDatabaseSchema,
  cdmDatabaseName = "friendly database name",
  cohortDatabaseSchema = cdmDatabaseSchema,
  cohortTable = "cohort",
  oracleTempSchema = cohortDatabaseSchema,
  outputFolder,
  sampleSize = NULL,
  repeats = 5,
  studyStartDate = "20160101",
  studyEndDate = "",
  createCohorts = T,
  runAnalyses = T,
  externalValidate = F,
  modelDatabaseName,
  summarizeResults,
  minCellCount = 5,
  verbosity = "INFO",
  cdmVersion = 5,
  requiredPriorObservation = 365
)

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.

sampleSize

The number of patients in the target population to sample

repeats

How many test/train splits to run

studyStartDate

Only cohort start dates after this date are included

studyEndDate

Only cohort end dates before this date are included

createCohorts

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

runAnalyses

Run the model development

summarizeResults

Summarise the results in the outputFolder for the cdmDatabaseName models

minCellCount

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

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

requiredPriorObservation

A sensitivity parameter (default is 365 days)

externalValdiate

Externally validate the models you developed

Details

This function executes the PredictionCovariateLookback Study.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## 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", 
        createCohorts = T,
        runAnalyses = T,
        minCellCount = 5,
        verbosity = "INFO",
        cdmVersion = 5,
        requiredPriorObservation = 365)

## End(Not run)

ohdsi-studies/PredictionCovariateLookback documentation built on April 24, 2021, 10:33 p.m.