A function to extract non-case and case binary characterization results
Source:R/CharacterzationQueries.R
getBinaryRiskFactors.RdA function to extract non-case and case binary characterization results
Usage
getBinaryRiskFactors(
connectionHandler,
schema,
cTablePrefix = "c_",
cgTablePrefix = "cg_",
databaseTable = "database_meta_data",
characterizationTargetId = NULL,
characterizationCaseId = NULL,
outcomeId = NULL,
outcomeWashout = NULL,
databaseId = NULL,
analysisIds = c(3),
riskWindowStart = NULL,
riskWindowEnd = NULL,
startAnchor = NULL,
endAnchor = 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')
- characterizationTargetId
the characterization target id
- characterizationCaseId
the characterization case id
- outcomeId
Am integer corresponding to the outcome cohort ID
- outcomeWashout
(optional) restrict to outcome washout
- databaseId
The database ID to restrict results to
- analysisIds
The feature extraction analysis ID of interest (e.g., 201 is condition)
- riskWindowStart
(optional) A vector of time-at-risk risk window starts to restrict to
- riskWindowEnd
(optional) A vector of time-at-risk risk window ends to restrict to
- startAnchor
(optional) A vector of time-at-risk start anchors to restrict to
- endAnchor
(optional) A vector of time-at-risk end anchors to restrict to
See also
Other Characterization:
characterizationCompareBinary(),
characterizationCompareContinuous(),
getBinaryCaseSeries(),
getBinaryTargetBaseline(),
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
rf <- getBinaryRiskFactors(
connectionHandler = connectionHandler,
schema = 'main',
characterizationTargetId = 1,
outcomeId = 3
)
#> Warning: Parameter 'use_risk_window_start' not found in SQL
#> Warning: Parameter 'risk_window_start' not found in SQL
#> Warning: Parameter 'use_risk_window_end' not found in SQL
#> Warning: Parameter 'risk_window_end' not found in SQL
#> Warning: Parameter 'use_start_anchor' not found in SQL
#> Warning: Parameter 'start_anchor' not found in SQL
#> Warning: Parameter 'use_end_anchor' not found in SQL
#> Warning: Parameter 'end_anchor' not found in SQL