createPhenotypeModel: Create the phenotype model

Description Usage Arguments Details

View source: R/CreatePhenoModel.R

Description

Create the phenotype model

Usage

1
2
3
4
5
6
7
8
createPhenotypeModel(connectionDetails, xSpecCohort, cdmDatabaseSchema,
  cohortDatabaseSchema, cohortDatabaseTable, outDatabaseSchema,
  modelOutputFileName = "train", xSensCohort,
  prevalenceCohort = xSensCohort, excludedConcepts = c(),
  addDescendantsToExclude = FALSE, mainPopulationCohort = 0,
  lowerAgeLimit = 0, upperAgeLimit = 120, gender = c(8507, 8532),
  startDate = "19000101", 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 a database schema where the user has write capability. A temporary cohort table will be created here.

modelOutputFileName

A string designation for the training model file

xSensCohort

The number of the "extremely sensitive (xSens)" cohort definition id in the cohort table (used to exclude subjects from the base population)

prevalenceCohort

The number of the cohort definition id to determine the disease prevalence, (default=xSensCohort)

excludedConcepts

A list of conceptIds to exclude from featureExtraction. These should include all concept_ids that were used to define the xSpec model (default=NULL)

addDescendantsToExclude

Should descendants of excluded concepts also be excluded? (default=FALSE)

mainPopulationCohort

The number of the cohort ID 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)

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

Function to create a diagnostic prediction model for a health outcome of interest using the xSpec cohort. The model may be applied to the evaluation cohort to determine probabilities for each subject for the health outcome of interest.


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