getCmPropensityModel: Extract the cohort method model

View source: R/EstimationQueries.R

getCmPropensityModelR Documentation

Extract the cohort method model

Description

This function extracts the cohort method model.

Usage

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

indicationId

The indications that the target & comparator was nested to

analysisId

the analysis ID to restrict to

databaseId

the database ID to restrict to

Details

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

Value

Returns a data.frame with the cohort method model

See Also

Other Estimation: .getCmVersion(), .getSccsVersion(), getCMEstimation(), getCmDiagnosticsData(), getCmMetaEstimation(), getCmNegativeControlEstimates(), getCmOutcomes(), getCmTable(), getCmTargets(), getSccsDiagnosticsData(), getSccsEstimation(), getSccsMetaEstimation(), getSccsModel(), getSccsNegativeControlEstimates(), getSccsOutcomes(), getSccsTable(), getSccsTargets(), getSccsTimeToEvent(), plotCmEstimates(), plotSccsEstimates()

Examples

conDet <- getExampleConnectionDetails()

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

cmModel <- getCmPropensityModel(
  connectionHandler = connectionHandler, 
  schema = 'main'
)


OhdsiReportGenerator documentation built on Nov. 14, 2026, 1:09 a.m.