In a head-to-head trial about 1000 patients are needed to observe 650 failures with accrual time of 24 months, follow-up of 6 months, baseline hazard equal to 5% per year, and HR = 0.775 (error I 5%; power 90%, administrative censoring only). How does total trial duration change by varying the assumed baseline hazard and HR ?
This question was made at the PSI Wednesday challenge of February 2022, and this small package gives an answer to it.
devtools::install_github("bonorico/studydur")
library(studydur)
Type ?optim_duration
and alike.
Run output_example.R
(set yes_ggplot <- TRUE
) in folder out
to produce the proposed plot (see gif below).
See Bericht.pdf
, or run Bericht.Rmd
(HTML-knit in Rstudio) to have more infos about the challenge and the proposed approach.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.