computeMdrr
computes the minimal detectable relative risk (MDRR) for drug-outcome pairs
using a standard approach that stratifies by age and gender (Armstrong 1987).
computeMdrr(
connectionDetails,
oracleTempSchema = NULL,
tempEmulationSchema = getOption("sqlRenderTempEmulationSchema"),
cdmDatabaseSchema,
exposureOutcomePairs,
exposureDatabaseSchema = cdmDatabaseSchema,
exposureTable = "drug_era",
outcomeDatabaseSchema = cdmDatabaseSchema,
outcomeTable = "condition_era",
cdmVersion = "5"
)
An R object of type ConnectionDetails
created using the
function createConnectionDetails
in the
DatabaseConnector
package.
DEPRECATED: use `tempEmulationSchema` instead.
Some database platforms like Oracle and Impala do not truly support temp tables. To emulate temp tables, provide a schema with write privileges where temp tables can be created.
Name of database schema that contains OMOP CDM and vocabulary.
A data frame with at least two columns:
"exposureId" or "targetId" containing the drug_concept_ID or cohort_definition_id of the exposure variable
"outcomeId" containing the condition_concept_ID or cohort_definition_id of the outcome variable
The name of the database schema that is the location where the exposure data used to define the exposure cohorts is available. If exposureTable = DRUG_ERA, exposureDatabaseSchema is not used by assumed to be cdmSchema. Requires read permissions to this database.
The tablename that contains the exposure cohorts. If exposureTable <> DRUG_ERA, then expectation is exposureTable has format of COHORT table: COHORT_DEFINITION_ID, SUBJECT_ID, COHORT_START_DATE, COHORT_END_DATE.
The name of the database schema that is the location where the data used to define the outcome cohorts is available. If exposureTable = CONDITION_ERA, exposureDatabaseSchema is not used by assumed to be cdmSchema. Requires read permissions to this database.
The tablename that contains the outcome cohorts. If outcomeTable <> CONDITION_OCCURRENCE, then expectation is outcomeTable has format of COHORT table: COHORT_DEFINITION_ID, SUBJECT_ID, COHORT_START_DATE, COHORT_END_DATE.
Define the OMOP CDM version used: currently support "4" and "5".
A data frame containing the MDRRs for the given exposure-outcome pairs.
Armstrong B. A simple estimator of minimum detectable relative risk, sample size, or power in cohort studies. American journal of epidemiology. 1987; 126: 356-8.
if (FALSE) {
connectionDetails <- createConnectionDetails(
dbms = "sql server",
server = "RNDUSRDHIT07.jnj.com"
)
exposureOutcomePairs <- data.frame(
exposureId = c(767410, 1314924, 907879),
outcomeId = c(444382, 79106, 138825)
)
mdrrs <- computeMdrr(connectionDetails,
"cdm_truven_mdcr",
exposureOutcomePairs,
outcomeTable = "condition_era"
)
}