Visualizing Survival Data with the {ggsurvfit} R Package

R/Basel 2023


🗓 July 21, 2023 | Time TBD

🏨 Roche Campus, Grenzacherstrasse 124, 4070 Basel, Switzerland

💥 Conference Registration through July 14th or until event sells out


Abstract

The {ggsurvfit} package eases the creation of time-to-event or survival analysis summary figures with {ggplot2}, such as a Kaplan-Meier plot. The concise and modular code creates figures ready for publication. Each {ggsurvfit} function (e.g. add_confidence_interval(), add_risktable(), etc.) is written as a proper {ggplot2} ‘geom’, meaning the package functions can be woven with {ggplot2} functions. The implication is that you do not need to learn new functions to style the plot: rather, you may rely on the suite of {ggplot2} functions you already know.

Lastly, the package includes gems for those using the CDISC ADaM ADTTE data model. The “PARAM” value is used to construct enhanced labels in the figure. The event indicator, “CNSR”, is coded in the opposite way the {survival} package expects. This difference creates an opportunity for errors to be silently introduced in an analysis. The {ggsurvfit} package exports a function called Surv_CNSR() to resolve this concern by creating a survival object that uses ADTTE coding conventions as the default. The function can be used in {ggsurvfit} as well as any other package with a survival endpoint.

Install {ggsurvfit} from CRAN with

install.packages('ggsurvfit')

Authors

Headshot of Daniel Sjoberg

Daniel D. Sjoberg (he/him) is a Software Engineer at Genentech. Previously, he was a Lead Data Science Manager at the Prosate Cancer Clinical Trials Consortium, and a Senior Biostatistician at Memorial Sloan Kettering Cancer Center in New York City. He enjoys R package development, creating many packages available on CRAN, R-Universe, and GitHub. His research interests include adaptive methods in clinical trials, precision medicine, and predictive modeling. Daniel is the winner of the 2021 American Statistical Association (ASA) Innovation in Statistical Programming and Analytics award.



Headshot of Mark Baillie

Mark Baillie is a member of the Advanced Methodology and Data Science group at Novartis. He focuses on methodology to support drug development, working on a variety of internal and external initiatives to improve the reporting of clinical trials. These include effective visual communication, initial data analysis, DMC reporting, analaysis results standards, and data challenges. Mark is a member of the Stratos initiative and the PSI visualisation special interest group.