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
29
30
31
execute(
  connectionDetails,
  cdmDatabaseSchema,
  cdmDatabaseName = "friendly database name",
  cohortDatabaseSchema = cdmDatabaseSchema,
  cohortTable = "cohort",
  oracleTempSchema = cohortDatabaseSchema,
  setting = NULL,
  sampleSize = NULL,
  recalibrate = F,
  recalibrateInterceptOnly = F,
  riskWindowStart = 1,
  startAnchor = "cohort start",
  riskWindowEnd = 365,
  endAnchor = "cohort start",
  firstExposureOnly = F,
  removeSubjectsWithPriorOutcome = F,
  priorOutcomeLookback = 99999,
  requireTimeAtRisk = F,
  minTimeAtRisk = 1,
  includeAllOutcomes = T,
  outputFolder,
  createCohorts = F,
  runAnalyses = F,
  aggregateCohorts = T,
  viewShiny = F,
  packageResults = F,
  minCellCount = 10,
  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.

setting

A data.frame with the tId, oId, model triplets to run - if NULL it runs all possible combinations

sampleSize

How many patients to sample from the target population

recalibrate

Recalibrate the model intercept and slop

recalibrateInterceptOnly

Recalibrate the intercept only.

riskWindowStart

The start of the risk window (in days) relative to the startAnchor.

startAnchor

The anchor point for the start of the risk window. Can be "cohort start" or "cohort end".

riskWindowEnd

The end of the risk window (in days) relative to the endAnchor parameter

endAnchor

The anchor point for the end of the risk window. Can be "cohort start" or "cohort end".

firstExposureOnly

Should only the first exposure per subject be included? Note that this is typically done in the createStudyPopulation function,

removeSubjectsWithPriorOutcome

Remove subjects that have the outcome prior to the risk window start?

priorOutcomeLookback

How many days should we look back when identifying prior outcomes?

requireTimeAtRisk

Should subject without time at risk be removed?

minTimeAtRisk

The minimum number of days at risk required to be included

includeAllOutcomes

(binary) indicating whether to include people with outcomes who are not observed for the whole at risk period

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.

createCohorts

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

runAnalyses

Run the model development

aggregateCohorts

Run this after runAnalyses to calculate the performance for combination of males and females, black and non-black

viewShiny

View the results as a shiny app

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.

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

standardCovariates

Use this to add standard covariates such as age/gender

Details

This function executes the PCE 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
## 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",
        outcomeId = 1,
        oracleTempSchema = NULL,
        riskWindowStart = 1,
        startAnchor = 'cohort start',
        riskWindowEnd = 365,
        endAnchor = 'cohort start',
        outputFolder = "c:/temp/study_results", 
        createCohorts = T,
        runAnalyses = T,
        aggregateCohorts = T,
        viewShiny = F,
        packageResults = F,
        minCellCount = 10,
        verbosity = "INFO",
        cdmVersion = 5)

## End(Not run)

ohdsi-studies/PCE documentation built on Feb. 15, 2021, 6:33 a.m.