pharmaverse / ggsurvfit

http://www.danieldsjoberg.com/ggsurvfit/
Other
70 stars 19 forks source link

Draft Example data sets #33

Closed bailliem closed 2 years ago

bailliem commented 2 years ago

I have added a draft data set (ADTTE again) I simulated a while ago. This time ADTTE is based on a trial in breast cancer comparing 4 different treatment regimens. See here for background.

library(ggsurvfit)
library(ggplot2)
p <- ADTTE %>%  survfit2(Surv(AVAL, 1-CNSR) ~ TRT01P, data = .) %>%
  ggsurvfit() +
  add_censor_mark() +
  add_confidence_interval() 

p
p + add_risktable()

image

image

It does provide challenges with the treatment labels and the number of arms. The treatment labels, etc. could all be edited.

The data set and variable definitions

The data set is an abridged version of the CDISC ADaM ADTTE time to event data set.

The data set contains the following variables:

A number of baseline measurements are also included such as age, hormone receptor status and prior radiotherapy treatment. Additional details on reasons for study discontinuation and censoring event description are also included.

ddsjoberg commented 2 years ago

Fantastic! I'm working on a theme that replaces the strata labels with a block of color in the risk tables. I think that will alleviate many of the concerns from long labels.

I think I've found a solution (somewhat fiddly), and it needs testing to see how it holds up against users' customizations....

ddsjoberg commented 2 years ago

@bailliem how do you want to deal with the CNSR coding in this dataset? Just pass Surv(AVAL, 1 - CNSR)?

bailliem commented 2 years ago

@bailliem how do you want to deal with the CNSR coding in this dataset? Just pass Surv(AVAL, 1 - CNSR)?

I think so for now. Could also have an example which demostrates the Surv_CNSR function. But to be discussed..

bailliem commented 2 years ago

This will be a great addition.

  • [x] can you add column labels to the data frame?
  • [x] the data set needs to be documented in the R/data.R file.
  • [x] do you think it would be worth it to include the simulation code in data-raw/DATASETS.R ?

ping - can you take a look now. Source data is in there but sharing simulation code may be tricky.