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",
characterizationTargetIds = NULL,
analysisIds = NULL,
covariateIds = NULL,
conceptIds = NULL,
databaseIds = NULL,
includeNames = TRUE,
minThreshold = 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')
- characterizationTargetIds
The characterization target cohort ids of interest
- 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
- includeNames
Whether to add database and cohort names (setting to FALSE will make extraction quicker)
- minThreshold
(optional) The minimum average value for results to be returned
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:
characterizationCompareBinary(),
characterizationCompareContinuous(),
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getCaseCounts(),
getCharacterizationCaseSettings(),
getCharacterizationDemographics(),
getCharacterizationTargetSettings(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getContinuousTargetBaseline(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceRates(),
getIncidenceTargetSettings(),
getNonCaseCounts(),
getOutcomesUsedInCharacterization(),
getOutcomesUsedInIncidence(),
getTargetCounts(),
getTargetsUsedInCharacterization(),
getTargetsUsedInIncidence(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
Examples
conDet <- getExampleConnectionDetails()
connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
#> Connecting using SQLite driver
btb <- getBinaryTargetBaseline(
connectionHandler = connectionHandler,
schema = 'main',
characterizationTargetIds = 1
)