getAggregateBinaryRiskFactors: A function to extract binary risk factor across databases

View source: R/CharacterzationQueries.R

getAggregateBinaryRiskFactorsR Documentation

A function to extract binary risk factor across databases

Description

A function to extract binary risk factor across databases

Usage

getAggregateBinaryRiskFactors(
  connectionHandler,
  schema,
  cTablePrefix = "c_",
  cgTablePrefix = "cg_",
  characterizationTargetId = NULL,
  characterizationCaseId = NULL,
  outcomeId = NULL,
  outcomeWashout = 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

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

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

Details

Specify the connectionHandler, the schema and the target/outcome cohort IDs

Value

A data.frame with the aggregate binary risk factors

See Also

Other Characterization: characterizationCompareBinary(), characterizationCompareContinuous(), getAggregateContinuousRiskFactors(), getBinaryCaseSeries(), getBinaryRiskFactors(), 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)

rf <- getAggregateBinaryRiskFactors(
  connectionHandler = connectionHandler, 
  schema = 'main',
  characterizationTargetId = 1, 
  outcomeId = 3
)


OhdsiReportGenerator documentation built on Nov. 14, 2026, 1:09 a.m.