View source: R/EstimationQueries.R
| getCmTable | R Documentation |
This function extracts the specific cohort method table.
getCmTable(
connectionHandler,
schema,
table = c("attrition", "follow_up_dist", "interaction_result", "covariate_balance",
"kaplan_meier_dist", "likelihood_profile", "preference_score_dist",
"propensity_model", "shared_covariate_balance")[1],
cmTablePrefix = "cm_",
cgTablePrefix = "cg_",
databaseTable = "database_meta_data",
targetIds = NULL,
indicationIds = NULL,
outcomeIds = NULL,
comparatorIds = NULL,
analysisIds = NULL,
databaseIds = NULL
)
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) |
table |
The result table to extract |
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 |
indicationIds |
The indications that the target & comparator was nested to |
outcomeIds |
A vector of integers corresponding to the outcome 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 |
Specify the connectionHandler, the schema and optionally the target/comparator/outcome/analysis/database IDs
Returns a data.frame with the cohort method requested table
Other Estimation:
.getCmVersion(),
.getSccsVersion(),
getCMEstimation(),
getCmDiagnosticsData(),
getCmMetaEstimation(),
getCmNegativeControlEstimates(),
getCmOutcomes(),
getCmPropensityModel(),
getCmTargets(),
getSccsDiagnosticsData(),
getSccsEstimation(),
getSccsMetaEstimation(),
getSccsModel(),
getSccsNegativeControlEstimates(),
getSccsOutcomes(),
getSccsTable(),
getSccsTargets(),
getSccsTimeToEvent(),
plotCmEstimates(),
plotSccsEstimates()
conDet <- getExampleConnectionDetails()
connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
cmTable <- getCmTable(
connectionHandler = connectionHandler,
schema = 'main',
table = 'attrition'
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.