getCMEstimation {OhdsiReportGenerator}R Documentation

Extract the cohort method results

Description

This function extracts the single database cohort method estimates for results that can be unblinded and have a calibrated RR

Usage

getCMEstimation(
  connectionHandler,
  schema,
  cmTablePrefix = "cm_",
  cgTablePrefix = "cg_",
  databaseTable = "database_meta_data",
  targetIds = NULL,
  outcomeIds = NULL,
  comparatorIds = NULL
)

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

outcomeIds

A vector of integers corresponding to the outcome cohort IDs

comparatorIds

A vector of integers corresponding to the comparator cohort IDs

Details

Specify the connectionHandler, the schema and the target/comparator/outcome cohort IDs

Value

Returns a data.frame with the columns:

See Also

Other Estimation: getCmDiagnosticsData(), getCmMetaEstimation(), getSccsDiagnosticsData(), getSccsEstimation(), getSccsMetaEstimation(), plotCmEstimates(), plotSccsEstimates()

Examples

conDet <- getExampleConnectionDetails()

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

cmEst <- getCMEstimation(
  connectionHandler = connectionHandler, 
  schema = 'main',
  targetIds = 1,
  outcomeIds = 3
)


[Package OhdsiReportGenerator version 1.1.1 Index]