design_nb {gscounts}R Documentation

Clinical trials with negative binomial outcomes

Description

Design a clinical trial with negative binomial outcomes

Usage

design_nb(
  rate1,
  rate2,
  dispersion,
  power,
  ratio_H0 = 1,
  sig_level,
  random_ratio = 1,
  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

power

numeric; target power

ratio_H0

numeric; positive number denoting the rate ratio rate_1/rate_2 under the null hypothesis, i.e. the non-inferiority or superiority margin

sig_level

numeric; Type I error / significance level

random_ratio

numeric; randomization ratio n1/n2

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

accrual_period

numeric; accrual period

followup_max

numeric; maximum exposure time of a patient

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.

Value

A list containing the following components:

rate1

as input

rate2

as input

dispersion

as input

power

as input

ratio_H0

as input

ratio_H1

ratio rate1/rate2

sig_level

as input

random_ratio

as input

t_recruit1

as input

t_recruit2

as input

study_period

as input

followup_max

as input

max_info

maximum information

Examples

# Calculate sample size for given accrual period and study duration assuming uniformal accrual
out <- design_nb(rate1 = 0.0875, rate2 = 0.125, dispersion = 5, power = 0.8,
                 ratio_H0 = 1, sig_level = 0.025,
                 study_period = 4, accrual_period = 1, random_ratio = 2)
out

# Calculate sample size for a fixed exposure time of 0.5 years
out <- design_nb(rate1 = 4.2, rate2 = 8.4, dispersion = 3, power = 0.8,
                 ratio_H0 = 1, sig_level = 0.025,
                 followup_max = 0.5, random_ratio = 2)
out

# Calculate study period for given recruitment time
t_recruit1 <- seq(0, 1.25, length.out = 1200)
t_recruit2 <- seq(0, 1.25, length.out = 800)
out <- design_nb(rate1 = 0.0875, rate2 = 0.125, dispersion = 5, power = 0.8,
                 ratio_H0 = 1, sig_level = 0.025,
                 t_recruit1 = t_recruit1, t_recruit2 = t_recruit2)

[Package gscounts version 0.1-4 Index]