Extract the aggregate covariates for the target ids of interest
Source:R/CharacterzationQueries.R
getBinaryTargetBaseline.RdThis function extracts the specified covariates for the specified targets
Usage
getBinaryTargetBaseline(
connectionHandler,
schema,
cTablePrefix = "c_",
cgTablePrefix = "cg_",
databaseTable = "database_meta_data",
targetIds = NULL,
analysisIds = NULL,
covariateIds = NULL,
conceptIds = NULL,
databaseIds = 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
- analysisIds
The analysisIds of the covariate to restrict results to
- covariateIds
The covariateIds to restict results to
- conceptIds
The conceptIds of the covariate to restrict results to
- databaseIds
The databaseIds of the covariate to restrict results to
Value
Returns a data.frame with the columns:
databaseName the name of the database
databaseId the unique identifier of the database
targetName the target cohort name
targetId the target cohort unique identifier
minPriorObservation the
limitToFirstINDays the
covariateName the
covariateId the
analysisId the
sumValue the
averageValue the
See also
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
Examples
conDet <- getExampleConnectionDetails()
connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
#> Connecting using SQLite driver
btb <- getBinaryTargetBaseline(
connectionHandler = connectionHandler,
schema = 'main',
targetIds = 1
)