overall_sample_size: Overall Sample Size

Description Usage Arguments References

View source: R/sample-size.r

Description

Calculates the sample size required to detect a given set of effects in a two-stage randomized clinical trial. Returns the largest of the required sample sizes for a given set of treatment, selection, and preference effects.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
overall_sample_size(
  power,
  phi,
  delta_pi,
  delta_nu,
  delta_tau,
  sigma2,
  alpha = 0.05,
  theta = 0.5,
  xi = 1,
  nstrata = 1,
  k = 1,
  dist = "norm"
)

Arguments

power

desired study power. Should be numeric value between 0 and 1.

phi

the proportion of patients preferring treatment 1. Should be numeric value between 0 and 1. If study is stratified, should be vector with length equal to the number of strata in the study.

delta_pi

overall study preference effect.

delta_nu

overall study selection effect.

delta_tau

overall study treatment effect.

sigma2

variance estimate. Should be positive numeric values. If study is stratified, should be vector of within-stratum variances with length equal to the number of strata in the study.

alpha

desired type I error rate.

theta

proportion of patients assigned to choice arm in the initial randomization. Should be numeric value between 0 and 1 (default=0.5).

xi

a numeric vector of the proportion of patients in each stratum. Length of vector should equal the number of strata in the study and sum of vector should be 1. All vector elements should be numeric values between 0 and 1. Default is 1 (i.e. unstratified design).

nstrata

number of strata. Default is 1 (i.e. unstratified design).

k

the ratio of treatment A to treatment B in the random arm. (default 1, i.e. equal distribution to the two treatments in the random arm)

References

Turner RM, et al. (2014). "Sample Size and Power When Designing a Randomized Trial for the Estimation of Treatment, Selection, and Preference Effects." Medical Decision Making, 34:711-719. (PubMed)

Cameron B, Esserman D (2016). "Sample Size and Power for a Stratified Doubly Randomized Preference Design." Stat Methods Med Res. (PubMed)


preference documentation built on Sept. 13, 2020, 5:08 p.m.