Compute stopping boundaries, maximum sample size, and expected sample sizes for a group sequential cluster randomized trial.
gsDesignCRT.Rd
gsDesignCRT()
is used to determine the maximum sample
size needed for a specified parallel group sequential cluster randomized
trial to detect a clinically meaningful effect size with some Type I error
rate and power. Code adapted from gsDesign package.
Usage
gsDesignCRT(
k = 3,
outcome_type = 1,
test_type = 1,
test_sides = 1,
size_type = 1,
recruit_type = 1,
timing_type = 2,
delta = 1,
sigma_vec = c(1, 1),
p_vec = c(0.5, 0.5),
rho = 0,
alpha = 0.05,
beta = 0.1,
m_fix = 1,
n_fix = 1,
info_timing = 1,
size_timing = 1,
alpha_sf = sfLDOF,
alpha_sfpar = -4,
beta_sf = sfLDOF,
beta_sfpar = -4,
tol = 1e-06,
r = 18
)
Arguments
- k
Number of analyses planned, including interim and final.
- outcome_type
1=
continuous difference of means2=
binary difference of proportions- test_type
1=
early stopping for efficacy only2=
early stopping for binding futility only3=
early stopping for non-binding futility only4=
early stopping for either efficacy or binding futility5=
early stopping for either efficacy or non-binding futility- test_sides
1=
one-sided test2=
two-sided test- size_type
1=
clusters per arm2=
cluster size- recruit_type
1=
recruit clusters with fixed sizes2=
recruit individuals into fixed number of clusters3=
recruit both clusters and individuals- timing_type
1=
maximum and expected sample sizes based on specified information levels ininfo_timing
2=
maximum sample size based on specified information levels ininfo_timing
and expected sample sizes based on specified sample size levels insize_timing
- delta
Effect size for theta under alternative hypothesis. Must be > 0.
- sigma_vec
Standard deviations for control and treatment groups (continuous case).
- p_vec
Probabilities of event for control and treatment groups (binary case).
- rho
Intraclass correlation coefficient. Default value is 0.
- alpha
Type I error, default value is 0.05.
- beta
Type II error, default value is 0.1 (90% power).
- m_fix
Number of clusters; used to find maximum size of each cluster.
- n_fix
Mean size of each cluster; used to find maximum number of clusters per arm.
- info_timing
Sets timing of interim analyses based on information levels. Default of 1 produces analyses at equal-spaced increments. Otherwise, this is a vector of length
k
ork-1
. The values should satisfy0 < info_timing[1] < info_timing[2] < ... < info_timing[k-1] < info_timing[k]=1
.- size_timing
Sets timing of interim analyses based on sample size levels if
timing_type = 2
. Default of 1 produces analyses at equal-spaced increments. Otherwise, this is a vector of lengthk
ork-1
. The values should satisfy0 < size_timing[1] < size_timing[2] < ... < size_timing[k-1] < size_timing[k]=1
.- alpha_sf
A spending function or a character string indicating an upper boundary type (that is, “WT” for Wang-Tsiatis bounds, “OF” for O'Brien-Fleming bounds, and “Pocock” for Pocock bounds). The default value is
sfLDOF
which is a Lan-DeMets O'Brien-Fleming spending function. See details,vignette("SpendingFunctionOverview")
, manual and examples.- alpha_sfpar
Real value, default is \(-4\) which is an O'Brien-Fleming-like conservative bound when used with a Hwang-Shih-DeCani spending function. This is a real-vector for many spending functions. The parameter
alpha_sfpar
specifies any parameters needed for the spending function specified byalpha_sf
; this will be ignored for spending functions (sfLDOF
,sfLDPocock
) or bound types (“OF”, “Pocock”) that do not require parameters.- beta_sf
A spending function or a character string indicating an lower boundary type (that is, “WT” for Wang-Tsiatis bounds, “OF” for O'Brien-Fleming bounds, and “Pocock” for Pocock bounds). The default value is
sfLDOF
which is a Lan-DeMets O'Brien-Fleming spending function. See details,vignette("SpendingFunctionOverview")
, manual and examples.- beta_sfpar
Real value, default is \(-4\) which is an O'Brien-Fleming-like conservative bound when used with a Hwang-Shih-DeCani spending function. This is a real-vector for many spending functions. The parameter
beta_sfpar
specifies any parameters needed for the spending function specified bybeta_sf
; this will be ignored for spending functions (sfLDOF
,sfLDPocock
) or bound types (“OF”, “Pocock”) that do not require parameters.- tol
Tolerance for error (default is 0.000001). Normally this will not be changed by the user. This does not translate directly to number of digits of accuracy, so use extra decimal places.
- r
Integer value controlling grid for numerical integration as in Jennison and Turnbull (2000); default is 18, range is 1 to 80. Larger values provide larger number of grid points and greater accuracy. Normally
r
will not be changed by the user.
Value
Object containing the following elements:
- k
As input.
- outcome_type
As input.
- test_type
As input.
- test_sides
As input.
- size_type
As input.
- recruit_type
As input.
- timing_type
As input.
- delta
As input.
- sigma_vec
As input.
- p_vec
As input.
- rho
As input.
- alpha
As input.
- beta
As input.
- info_timing
As input.
- size_timing
As input.
- i
Fisher information at each planned interim analysis based on
timing_type
.- max_i
Maximum information corresponding to design specifications.
- m
Number of clusters per arm at each planned interim analysis.
- max_m
Maximum number of clusters per arm.
- e_m
A vector of length 2 with expected number of clusters per arm under the null and alternative hypotheses. For simplicity, the expected sizes with non-binding futility boundaries are calculated assuming the boundaries are binding futility.
- n
Average cluster size at each planned interim analysis.
- max_n
Maximum cluster size.
- e_m
A vector of length 2 with expected cluster sizes under the null and alternative hypotheses. For simplicity, the expected sizes with non-binding futility boundaries are calculated assuming the futility boundaries are binding.
- max_total
Maximum number of individuals in the trial.
- e_total
A vector of length 2 with expected number of individuals in the trial under the null and alternative hypotheses. For simplicity, the expected sizes with non-binding futility boundaries are calculated assuming the futility boundaries are binding.
- sufficient
Value denoting whether calculated sample size will be sufficient to achieve specified Type I error rate and power given the trial specifications.
- lower_bound
Calculated lower futility boundaries under analysis schedule specified by
timing_type
- upper_bound
Calculated upper efficacy boundaries under analysis schedule specified by
timing_types
.- tol
As input.
- r
As input.
References
Jennison C and Turnbull BW (2000), Group Sequential Methods with Applications to Clinical Trials. Boca Raton: Chapman and Hall.
Author
Lee Ding lee_ding@g.harvard.edu