drawAttritionDiagram: Draw the attrition diagram

View source: R/AttritionDiagram.R

drawAttritionDiagramR Documentation

Draw the attrition diagram

Description

drawAttritionDiagram draws the attrition diagram, showing how many people were excluded from the study population, and for what reasons.

Usage

drawAttritionDiagram(
  object,
  targetLabel = "Target",
  comparatorLabel = "Comparator",
  fileName = NULL
)

Arguments

object

Either an object of type cohortMethodData, a population object generated by functions like createStudyPopulation, or an object of type outcomeModel.

targetLabel

A label to us for the target cohort.

comparatorLabel

A label to us for the comparator cohort.

fileName

Name of the file where the plot should be saved, for example 'plot.png'. See the function ggsave in the ggplot2 package for supported file formats.

Value

A ggplot object. Use the ggsave function to save to file in a different format.


OHDSI/CohortMethod documentation built on Feb. 9, 2024, 9:01 a.m.