plotSexDistributions: Plots the sex distributions using the sex features

View source: R/CharacterizationPlots.R

plotSexDistributionsR Documentation

Plots the sex distributions using the sex features

Description

Creates bar charts for the target and case sex.

Usage

plotSexDistributions(
  sexData,
  riskWindowStart = "1",
  riskWindowEnd = "365",
  startAnchor = "cohort start",
  endAnchor = "cohort start"
)

Arguments

sexData

The sex data extracted using 'getCharacterizationDemographics(type = 'sex')'

riskWindowStart

The time at risk window start

riskWindowEnd

The time at risk window end

startAnchor

The anchor for the time at risk start

endAnchor

The anchor for the time at risk end

Details

Input the data returned from 'getCharacterizationDemographics(type = 'sex')' and the time-at-risk

Value

Returns a ggplot with the distributions

See Also

Other Characterization: getBinaryCaseSeries(), getBinaryRiskFactors(), getCaseBinaryFeatures(), getCaseContinuousFeatures(), getCaseCounts(), getCharacterizationDemographics(), getContinuousCaseSeries(), getContinuousRiskFactors(), getDechallengeRechallenge(), getIncidenceRates(), getTargetBinaryFeatures(), getTargetContinuousFeatures(), getTargetCounts(), getTimeToEvent(), plotAgeDistributions()

Examples

conDet <- getExampleConnectionDetails()

connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)

sexData <- getCharacterizationDemographics(
  connectionHandler = connectionHandler, 
  schema = 'main',
  targetId = 1, 
  outcomeId = 3, 
  type = 'sex'
)
plotSexDistributions(sexData = sexData)


OhdsiReportGenerator documentation built on April 12, 2025, 2:09 a.m.