| fixed_design | R Documentation | 
Computes fixed design sample size for many sample size methods.
Returns a tibble with a basic summary
fixed_design(
  x = c("AHR", "FH", "MB", "LF", "RD", "MaxCombo", "RMST", "Milestone"),
  alpha = 0.025,
  power = NULL,
  ratio = 1,
  studyDuration = 36,
  ...
)
| x | Sample size method; default is  | 
| alpha | One-sided Type I error (strictly between 0 and 1) | 
| power | Power ( | 
| ratio | Experimental:Control randomization ratio | 
| studyDuration | study duration | 
| ... | additional arguments like  | 
a table
library(dplyr)
# Average hazard ratio
x <- fixed_design("AHR", 
                  alpha = .025, power = .9, 
                  enrollRates = tibble::tibble(Stratum = "All",  duration = 18, rate = 1),
                  failRates = tibble::tibble(Stratum = "All", duration = c(4, 100), failRate = log(2) / 12, hr = c(1, .6), dropoutRate = .001),
                  studyDuration = 36)
x %>% summary()            
# Lachin and Foulkes (uses gsDesign::nSurv())
x <- fixed_design("LF", 
                  alpha = .025, power = .9, 
                  enrollRates = tibble::tibble(Stratum = "All",  duration = 18, rate = 1),
                  failRates = tibble::tibble(Stratum = "All", duration = 100, failRate = log(2) / 12, hr = .7, dropoutRate = .001),
                  studyDuration = 36)
x %>% summary()
# RMST
x <- fixed_design("RMST", alpha = .025, power = .9, 
                  enrollRates = tibble::tibble(Stratum = "All",  duration = 18, rate = 1),
                  failRates = tibble::tibble(Stratum = "All", duration = 100, failRate = log(2) / 12, hr = .7, dropoutRate = .001),
                  studyDuration = 36,
                  tau = 18)
x %>% summary()
# Milestone 
x <- fixed_design("Milestone", alpha = .025, power = .9, 
                  enrollRates = tibble::tibble(Stratum = "All",  duration = 18, rate = 1),
                  failRates = tibble::tibble(Stratum = "All", duration = 100, failRate = log(2) / 12, hr = .7, dropoutRate = .001),
                  studyDuration = 36,
                  tau = 18)
x %>% summary()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.