Learn R Programming

OhdsiReportGenerator (version 2.0.2)

getCmPropensityModel: Extract the cohort method model

Description

This function extracts the cohort method model.

Usage

getCmPropensityModel(
  connectionHandler,
  schema,
  cmTablePrefix = "cm_",
  targetId = NULL,
  comparatorId = NULL,
  analysisId = NULL,
  databaseId = NULL
)

Value

Returns a data.frame with the cohort method model

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

Details

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

See Also

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

Examples

Run this code
conDet <- getExampleConnectionDetails()

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

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

Run the code above in your browser using DataLab