View source: R/EstimationQueries.R
getCMEstimation | R Documentation |
This function extracts the single database cohort method estimates for results that can be unblinded and have a calibrated RR
getCMEstimation(
connectionHandler,
schema,
cmTablePrefix = "cm_",
cgTablePrefix = "cg_",
databaseTable = "database_meta_data",
targetIds = NULL,
outcomeIds = NULL,
comparatorIds = 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) |
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 |
Specify the connectionHandler, the schema and the target/comparator/outcome cohort IDs
Returns a data.frame with the columns:
databaseName the name of the database
analysisId the analysis design unique identifier
description the analysis design description
targetName the target cohort name
targetId the target cohort unique identifier
comparatorName the comparator cohort name
comparatorId the comparator cohort unique identifier
outcomeName the outcome name
outcomeId the outcome unique identifier
calibratedRr the calibrated relative risk
calibratedRrCi95Lb the calibrated relative risk 95 percent confidence interval lower bound
calibratedRrCi95Ub the calibrated relative risk 95 percent confidence interval upper bound
calibratedP the two sided calibrated p value
calibratedOneSidedP the one sided calibrated p value
calibratedLogRr the calibrated relative risk logged
calibratedSeLogRr the standard error of the calibrated relative risk logged
targetSubjects the number of people in the target cohort
comparatorSubjects the number of people in the comparator cohort
targetDays the total number of days at risk across the target cohort people
comparatorDays the total number of days at risk across the comparator cohort people
targetOutcomes the total number of outcomes occuring during the time at risk for the target cohort people
comparatorOutcomes the total number of outcomes occuring during the time at risk for the comparator cohort people
targetEstimator ...
Other Estimation:
getCmDiagnosticsData()
,
getCmMetaEstimation()
,
getSccsDiagnosticsData()
,
getSccsEstimation()
,
getSccsMetaEstimation()
,
plotCmEstimates()
,
plotSccsEstimates()
conDet <- getExampleConnectionDetails()
connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
cmEst <- getCMEstimation(
connectionHandler = connectionHandler,
schema = 'main',
targetIds = 1,
outcomeIds = 3
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.