createEvaluationCohort: Create the evaluation cohort

Description Usage Arguments Details

View source: R/CreateEvalCohort.R

Description

Create the evaluation cohort

Usage

1
2
3
4
5
6
7
createEvaluationCohort(connectionDetails, xSpecCohort, cdmDatabaseSchema,
  cohortDatabaseSchema, cohortDatabaseTable, outDatabaseSchema,
  evaluationOutputFileName, modelOutputFileName,
  mainPopulationCohort = 0, lowerAgeLimit = 0, upperAgeLimit = 120,
  startDays = -10000, endDays = 10000, gender = c(8507, 8532),
  startDate = "19001010", endDate = "21000101", cdmVersion = "5",
  outFolder = getwd())

Arguments

connectionDetails

connectionDetails created using the function createConnectionDetails in the DatabaseConnector package.

xSpecCohort

The number of the "extremely specific (xSpec)" cohort definition id in the cohort table (for noisy positives)

cdmDatabaseSchema

The name of the database schema that contains the OMOP CDM instance. Requires read permissions to this database. On SQL Server, this should specifiy both the database and the schema, so for example 'cdm_instance.dbo'.

cohortDatabaseSchema

The name of the database schema that is the location where the cohort data used to define the at risk cohort is available. Requires read permissions to this database.

cohortDatabaseTable

The tablename that contains the at risk cohort. The expectation is cohortTable has format of COHORT table: cohort_concept_id, SUBJECT_ID, COHORT_START_DATE, COHORT_END_DATE.

outDatabaseSchema

The name of the database schema that is the location where the data used to define the outcome cohorts is available. Requires read permissions to this database.

evaluationOutputFileName

A string designation for the evaluation cohort file

modelOutputFileName

A string designation for the training model file

mainPopulationCohort

The number of the cohort to be used as a base population for the model (default=NULL)

lowerAgeLimit

The lower age for subjects in the model (default=NULL)

upperAgeLimit

The upper age for subjects in the model (default=NULL)

startDays

The days to include prior to the cohort start date (default=-10000)

endDays

The days to include after the cohort start date (default=10000)

gender

The gender(s) to be included (default c(8507, 8532))

startDate

The starting date for including subjects in the model (default=NULL)

endDate

The ending date for including subjects in the model (default=NULL)

cdmVersion

The CDM version of the database (default=5)

outFolder

The folder where the output files will be written (default=working directory)

Details

Creates the evaluation cohort and applies a diagnostic prediction model for determination of a probability for the health outcome of interest


OHDSI/PheValuator documentation built on Oct. 15, 2019, 6:49 p.m.