Skip to contents

This function extracts the cohort method model.

Usage

getCmPropensityModel(
  connectionHandler,
  schema,
  cmTablePrefix = "cm_",
  targetId = NULL,
  comparatorId = NULL,
  analysisId = NULL,
  databaseId = 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

targetId

An integer corresponding to the target cohort ID

comparatorId

the comparator ID of interest

analysisId

the analysis ID to restrict to

databaseId

the database ID to restrict to

Value

Returns a data.frame with the cohort method model

Details

Specify the connectionHandler, the schema and optionally the target/comparator/analysis/database IDs

Examples

conDet <- getExampleConnectionDetails()

connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
#> Connecting using SQLite driver

cmModel <- getCmPropensityModel(
  connectionHandler = connectionHandler, 
  schema = 'main'
)
#> Please specify targetId