getPredictionCohorts {OhdsiReportGenerator} | R Documentation |
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_"
)
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
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
See Also
Other Prediction:
getPredictionDiagnosticTable()
,
getPredictionDiagnostics()
,
getPredictionHyperParamSearch()
,
getPredictionIntercept()
,
getPredictionModelDesigns()
,
getPredictionPerformanceTable()
,
getPredictionPerformances()
,
getPredictionTopPredictors()
Examples
conDet <- getExampleConnectionDetails()
connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
predCohorts <- getPredictionCohorts(
connectionHandler = connectionHandler,
schema = 'main'
)