design_gsnb: Group sequential design with negative binomial outcomes

Description Usage Arguments Details Value References Examples

View source: R/design.R

Description

Design a group sequential trial with negative binomial outcomes

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
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,
  ...
)

Arguments

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 μ_1/μ_2 under the null hypothesis, i.e. the non-inferiority or superiority margin

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 < timing[1] < ... < timing[K] = 1 with K the number of analyses, i.e. (K-1) interim analyses and final analysis. When the timing of efficacy and futility analyses differ, timing should not be defined. Instead, the arguments timing_eff and timing_fut have to be used to specify the timing of the efficacy and futility analyses, respectively.

esf

function; error spending function

esf_futility

function; futility error spending function

futility

character; either "binding", "nonbinding", or NULL for binding, nonbinding, or no futility boundaries

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.

Details

Denote μ_1 and μ_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{μ_1}{μ_2} ≥ δ vs. H_1: \frac{μ_1}{μ_2} < δ,

with δ=ratio_H0. Non-inferiority of treatment group 1 compared to treatment group 2 is tested for δ\in (1,∞). Superiority of treatment group 1 over treatment group 2 is tested for δ \in (0,1]. The calculation of the efficacy and (non-)binding futility boundaries are performed under the hypothesis H_0: \frac{μ_1}{μ_2}= δ and under the alternative H_1: \frac{μ_1}{μ_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.

Value

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 rate1/rate2

sig_level

as input

random_ratio

as input

power_fix

power of fixed design

expected_info

list; expected information under ratio_H0 and ratio_H1

efficacy

list; contains the elements esf (type I error spending function), spend (type I error spend at each look), and critical (critical value for efficacy testing)

futility

list; only part of the output if argument futility is defined in the input. Contains the elements futility (input argument futility), esf (type II error spending function), spend (type II error spend at each look), and critical (critical value for futility testing)

stop_prob

list; contains the element efficacy with the probabilities for stopping for efficacy and, if futility bounds are calculated, the element futility with the probabilities for stopping for futility

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

References

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>.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# 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))                    

gscounts documentation built on Nov. 2, 2021, 9:07 a.m.