getDbIctpdData | R Documentation |
This function is used to load the counts needed to compute the ICTPD from a database in OMOP CDM format.
getDbIctpdData( connectionDetails, cdmDatabaseSchema, oracleTempSchema = NULL, tempEmulationSchema = getOption("sqlRenderTempEmulationSchema"), cdmVersion = "5", exposureOutcomePairs, exposureDatabaseSchema = cdmDatabaseSchema, exposureTable = "drug_era", outcomeDatabaseSchema = cdmDatabaseSchema, outcomeTable = "condition_era", controlPeriodStart = -1080, controlPeriodEnd = -361, riskPeriodStart = 1, riskPeriodEnd = 30, censor = FALSE )
connectionDetails |
An R object of type |
cdmDatabaseSchema |
Name of database schema that contains OMOP CDM and vocabulary. |
oracleTempSchema |
DEPRECATED: use 'tempEmulationSchema' instead. |
tempEmulationSchema |
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. |
cdmVersion |
Define the OMOP CDM version used: currently supports "5". |
exposureOutcomePairs |
A data frame with at least two columns:
|
exposureDatabaseSchema |
The name of the database schema that is the location where the exposure data is available. If exposureTable = DRUG_ERA, exposureSchema is not used by assumed to be cdmSchema. Requires read permissions to this database. |
exposureTable |
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. |
outcomeDatabaseSchema |
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, exposureSchema is not used by assumed to be cdmSchema. Requires read permissions to this database. |
outcomeTable |
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. |
controlPeriodStart |
start of the control period - can be set between -99999 and 0, default is -1080. |
controlPeriodEnd |
end of the control period - can be set between -99999 and 0, default is -361. |
riskPeriodStart |
start of the risk period - can be set between 0 and 99999, default is 1. |
riskPeriodEnd |
end of the risk period - can be set between 0 and 99999, default is 30. |
censor |
a flag indicating wether the method should censor the observation period at the end of exposure or not. Available input is 0 or 1 with default = 0. |
An object of type ictpdData
containing counts that can be used in the
calculateStatisticsIc
function.
## Not run: library(SelfControlledCohort) connectionDetails <- createConnectionDetails(dbms = "postgresql", user = "joe", password = "secret", server = "myserver") exposureOutcomePairs <- data.frame(outcomeId = c(196794, 196794, 312648), exposurId = c(1501700, 1545958, 1551803)) ictpdData <- getDbIctpdData(connectionDetails, cdmDatabaseSchema = "cdm_schema.dbo", exposureOutcomePairs = exposureOutcomePairs) ictpdResults <- calculateStatisticsIC(ictpdData) ictpdResults ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.