Learn R Programming

OhdsiReportGenerator (version 2.0.2)

getPredictionCohorts: Extract a complete set of cohorts used in the prediction results

Description

This function extracts the target and outcome cohorts used to develop any model in the results

Usage

getPredictionCohorts(
  connectionHandler,
  schema,
  plpTablePrefix = "plp_",
  cgTablePrefix = "cg_"
)

Value

Returns a data.frame with the columns:

  • cohortId the cohort definition ID

  • cohortName the name of the cohort

  • type whether the cohort was used as a target or outcome cohort

Arguments

connectionHandler

A connection handler that connects to the database and extracts sql queries. Create a connection handler via `ResultModelManager::ConnectionHandler$new()`.

schema

The result database schema (e.g., 'main' for sqlite)

plpTablePrefix

The prefix used for the patient level prediction results tables

cgTablePrefix

The prefix used for the cohort generator results tables

Details

Specify the connectionHandler, the resultDatabaseSettings and any targetIds or outcomeIds to restrict models to

See Also

Other Prediction: getFullPredictionPerformances(), getPredictionAggregateTopPredictors(), getPredictionCovariates(), getPredictionDiagnosticTable(), getPredictionDiagnostics(), getPredictionHyperParamSearch(), getPredictionIntercept(), getPredictionLift(), getPredictionModelDesigns(), getPredictionOutcomes(), getPredictionPerformanceTable(), getPredictionPerformances(), getPredictionTargets(), getPredictionTopPredictors()

Examples

Run this code
conDet <- getExampleConnectionDetails()

connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)

predCohorts <- getPredictionCohorts(
  connectionHandler = connectionHandler, 
  schema = 'main'
)

Run the code above in your browser using DataLab