This function extracts all time to event results across databases for specified target and outcome cohorts.
Usage
getTimeToEvent(
connectionHandler,
schema,
cTablePrefix = "c_",
cgTablePrefix = "cg_",
databaseTable = "database_meta_data",
targetIds = NULL,
outcomeIds = NULL
)
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)
- cTablePrefix
The prefix used for the characterization 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
Value
Returns a data.frame with the columns:
databaseName the name of the database
targetName the target cohort name
targetId the target cohort unique identifier
outcomeName the outcome name
outcomeId the outcome unique identifier
outcomeType Whether the outcome is the first or subsequent
targetOutcomeType The interval that the outcome occurs
timeToEvent The number of days from index
numEvents The number of target cohort entries
timeScale The correspondin time-scale
See also
Other Characterization:
getBinaryCaseSeries()
,
getBinaryRiskFactors()
,
getCaseBinaryFeatures()
,
getCaseContinuousFeatures()
,
getCaseCounts()
,
getCharacterizationDemographics()
,
getContinuousCaseSeries()
,
getContinuousRiskFactors()
,
getDechallengeRechallenge()
,
getIncidenceRates()
,
getTargetBinaryFeatures()
,
getTargetContinuousFeatures()
,
getTargetCounts()
,
plotAgeDistributions()
,
plotSexDistributions()
Examples
conDet <- getExampleConnectionDetails()
connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
#> Connecting using SQLite driver
tte <- getTimeToEvent(
connectionHandler = connectionHandler,
schema = 'main'
)