| design_gsnb | R Documentation | 
Design a group sequential trial with negative binomial outcomes
design_gsnb(
  rate1,
  rate2,
  dispersion,
  ratio_H0 = 1,
  random_ratio = 1,
  power,
  sig_level,
  timing,
  esf = obrien,
  esf_futility = NULL,
  futility = NULL,
  t_recruit1 = NULL,
  t_recruit2 = NULL,
  study_period = NULL,
  accrual_period = NULL,
  followup_max = NULL,
  accrual_speed = 1,
  ...
)
rate1 | 
 numeric; assumed rate of treatment group 1 in the alternative  | 
rate2 | 
 numeric; assumed rate of treatment group 2 in the alternative  | 
dispersion | 
 numeric; dispersion (shape) parameter of negative binomial distribution  | 
ratio_H0 | 
 numeric; positive number denoting the rate ratio   | 
random_ratio | 
 numeric; randomization ratio n1/n2  | 
power | 
 numeric; target power of group sequential design  | 
sig_level | 
 numeric; Type I error / significance level  | 
timing | 
 numeric vector; 0 <   | 
esf | 
 function; error spending function  | 
esf_futility | 
 function; futility error spending function  | 
futility | 
 character; either   | 
t_recruit1 | 
 numeric vector; recruit (i.e. study entry) times in group 1  | 
t_recruit2 | 
 numeric vector; recruit (i.e. study entry) times in group 2  | 
study_period | 
 numeric; study duration; to be set when follow-up times are not identical between subjects, NULL otherwise  | 
accrual_period | 
 numeric; accrual period  | 
followup_max | 
 numeric; maximum exposure time of a subject; to be set when follow-up times are to be equal for each subject, NULL otherwise  | 
accrual_speed | 
 numeric; determines accrual speed; values larger than 1 result in accrual slower than linear; values between 0 and 1 result in accrual faster than linear.  | 
... | 
 further arguments. Will be passed to the error spending function.  | 
Denote  \mu_1 and \mu_2 the event rates in treatment groups 1 and 2.
This function considers smaller event rates to be better. 
The statistical hypothesis testing problem of interest is 
H_0: \frac{\mu_1}{\mu_2} \ge \delta  vs.  H_1: \frac{\mu_1}{\mu_2} < \delta,
with \delta=ratio_H0.
Non-inferiority of treatment group 1 compared to treatment group 2 is tested for \delta\in (1,\infty).
Superiority of treatment group 1 over treatment group 2 is tested for \delta \in (0,1].
The calculation of the efficacy and (non-)binding futility boundaries are performed
under the hypothesis H_0: \frac{\mu_1}{\mu_2}= \delta and 
under the alternative H_1: \frac{\mu_1}{\mu_2} = rate1 / rate2.
The argument 'accrual_speed' is used to adjust the accrual speed.
Number of subjects in the study at study time t is given by
f(t)=a * t^b with  a = n / accrual_period and b=accrual_speed  
For linear recruitment, b=1. 
b > 1 results is slower than linear recruitment for t < accrual_period and 
faster than linear recruitment for t > accrual_period. Vice verse for b < 1.
A list with class "gsnb" containing the following components:
rate1 | 
 as input  | 
rate2 | 
 as input  | 
dispersion | 
 as input  | 
power | 
 as input  | 
timing | 
 as input  | 
ratio_H0 | 
 as input  | 
ratio_H1 | 
 ratio   | 
sig_level | 
 as input  | 
random_ratio | 
 as input  | 
power_fix | 
 power of fixed design  | 
expected_info | 
 list; expected information under   | 
efficacy | 
 list; contains the elements   | 
futility | 
 list; only part of the output if argument   | 
stop_prob | 
 list; contains the element   | 
t_recruit1 | 
 as input  | 
t_recruit2 | 
 as input  | 
study_period | 
 as input  | 
followup_max | 
 as input  | 
max_info | 
 maximum information  | 
calendar | 
 calendar times of data looks; only calculated when exposure times are not identical  | 
Mütze, T., Glimm, E., Schmidli, H., & Friede, T. (2018). Group sequential designs for negative binomial outcomes. Statistical Methods in Medical Research, <doi:10.1177/0962280218773115>.
# Calculate the sample sizes for a given accrual period and study period (without futility)
out <- design_gsnb(rate1 = 0.0875, rate2 = 0.125, dispersion = 5, 
                   power = 0.8, timing = c(0.5, 1), esf = obrien,
                   ratio_H0 = 1, sig_level = 0.025,
                   study_period = 3.5, accrual_period = 1.25, random_ratio = 1)
out
# Calculate the sample sizes for a given accrual period and study period with binding futility
out <- design_gsnb(rate1 = 0.0875, rate2 = 0.125, dispersion = 5, 
                   power = 0.8, timing = c(0.5, 1), esf = obrien,
                   ratio_H0 = 1, sig_level = 0.025, study_period = 3.5, 
                   accrual_period = 1.25, random_ratio = 1, futility = "binding", 
                   esf_futility = obrien)
out
# Calculate study period for given recruitment times
expose <- seq(0, 1.25, length.out = 1042)
out <- design_gsnb(rate1 = 0.0875, rate2 = 0.125, dispersion = 5, 
                   power = 0.8, timing = c(0.5, 1), esf = obrien,
                   ratio_H0 = 1, sig_level = 0.025, t_recruit1 = expose, 
                   t_recruit2 = expose, random_ratio = 1)
out
# Calculate sample size for a fixed exposure time
out <- design_gsnb(rate1 = 0.0875, rate2 = 0.125, dispersion = 5, 
                   power = 0.8, timing = c(0.5, 1), esf = obrien,
                   ratio_H0 = 1, sig_level = 0.025,
                   followup_max = 0.5, random_ratio = 1)
                   
# Different timing for efficacy and futility analyses
 design_gsnb(rate1 = 1, rate2 = 2, dispersion = 5,
             power = 0.8, esf = obrien,
             ratio_H0 = 1, sig_level = 0.025, study_period = 3.5,
             accrual_period = 1.25, random_ratio = 1, futility = "binding",
             esf_futility = pocock, 
             timing_eff = c(0.8, 1),
             timing_fut = c(0.2, 0.5, 1))                    
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.