Extract the cohort method negative controls
Source:R/EstimationQueries.R
getCmNegativeControlEstimates.Rd
This function extracts the cohort method negative control table.
Usage
getCmNegativeControlEstimates(
connectionHandler,
schema,
cmTablePrefix = "cm_",
cgTablePrefix = "cg_",
databaseTable = "database_meta_data",
targetIds = NULL,
comparatorIds = NULL,
analysisIds = NULL,
databaseIds = NULL,
excludePositiveControls = TRUE
)
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)
- cmTablePrefix
The prefix used for the cohort method results tables
- cgTablePrefix
The prefix used for the cohort generator results tables
- databaseTable
The name of the table with the database details (default 'database_meta_data')
- targetIds
A vector of integers corresponding to the target cohort IDs
- comparatorIds
A vector of integers corresponding to the comparator cohort IDs
- analysisIds
the analysis IDs to restrict to
- databaseIds
the database IDs to restrict to
- excludePositiveControls
Whether to exclude the positive controls
Details
Specify the connectionHandler, the schema and optionally the target/comparator/outcome/analysis/database IDs
See also
Other Estimation:
getCMEstimation()
,
getCmDiagnosticsData()
,
getCmMetaEstimation()
,
getCmOutcomes()
,
getCmPropensityModel()
,
getCmTable()
,
getCmTargets()
,
getSccsDiagnosticsData()
,
getSccsEstimation()
,
getSccsMetaEstimation()
,
getSccsModel()
,
getSccsNegativeControlEstimates()
,
getSccsOutcomes()
,
getSccsTable()
,
getSccsTargets()
,
getSccsTimeToEvent()
,
plotCmEstimates()
,
plotSccsEstimates()
Examples
conDet <- getExampleConnectionDetails()
connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
#> Connecting using SQLite driver
cmNc <- getCmNegativeControlEstimates(
connectionHandler = connectionHandler,
schema = 'main'
)