Description Usage Arguments Details Value Author(s) References Examples
View source: R/Maxcombo_size.R
Compute predicted sample size and boundaries for a group sequential design of max-combo tests.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | GSMC_design(
FHweights,
interim_ratio,
error_spend,
eps,
p,
b,
tau,
omega,
lambda,
lambda.trt,
rho,
gamma,
beta,
stoch = TRUE,
range_ext = 200,
time_ext_multiplier = 1.5,
time_increment = 0.01,
n.rep = 5
)
|
FHweights |
a list of pairs of parameters (rho, gamma) for the Fleming Harrington weighted log-rank tests:W(t)=S^ρ(t^-)(1-S(t^-))^γ. The first one will provide the information fraction we will use to sign the stopping time. Now we only accommodate the surrogate information fraction, i.e., rho = 0 and gamma = 0. |
interim_ratio |
a vector of ratios between 0 and 1 that sign the stopping time following the first type of information fraction in FHweights, i.e. the event sizes. Note that the last value must be 1, otherwise, the function will automatically append 1 for the final stage. |
error_spend |
cumulative errors spent at each stage (including the final one). Must be of the same length as interim_ratio or one element shorter if the last value of interim_ratio is less than 1. The last element of error_spend should be type I error |
eps |
the change point, before which, the hazard ratio is 1, and after which, the hazard ratio is theta |
p |
treatment assignment probability. |
b |
the number of subintervals per time unit. |
tau |
the end of the follow-up time in the study. Note that this is identical to T+τ in the paper from Hasegawa (2014). |
omega |
the minimum follow-up time for all the patients. Note that Hasegawa(2014) assumes that the accrual is uniform between time 0 and R, and there does not exist any censoring except for the administrative censoring at the ending time τ. Thus this value omega is equivalent to |
lambda |
the hazard for the control group. |
lambda.trt |
the hazard for the treatment group after time eps. |
beta |
type II error, 1-power. |
stoch |
stochastic prediction or not (exact prediction), the former is default. |
range_ext |
the width to extend the range of sample sizes. If the predicted sample size is not found in the range, try a wider |
time_ext_multiplier |
compute the time window for the possible stopping time points by multiplying it with the total expected follow-up time |
time_increment |
time increments to compute the predicted stopping time points, the finer the more accurate. |
n.rep |
same as the one in |
Predict the sample sizes and boundaries to achieve the targeted type I errors (error spent at each stage) and power. Prediction approaches include the exact prediction or the stochastic prediction approach following 2-piece-wise exponential distributions given in the appendix of the reference paper.
z_alpha_pred |
predicted boundary values for all the stages, length is equivalent to the input |
z_alpha_vec_pred |
predicted boundary values for all the test statistics following |
d_fixed |
the required observed events at each stage. |
n_FH |
the total required number of subjects according to the defined hazards. |
n_event_FH |
the total required number of events according to the defined hazards. |
index |
records the ordered stages for each tests, starting from 1 and ending at the length of |
interim_pred0 |
predicts stopping time points under the null hypothesis following the order of |
interim_pred1 |
predicts stopping time points under the alternative hypothesis following the order of |
Sigma0 |
predicts correlation matrix under the null hypothesis with each row and column following the test statistics corresponding to |
Sigma1 |
predicts correlation matrix under the alternative hypothesis with each row and column following the test statistics corresponding to |
mu1 |
the predicts unit mean under the alternative hypothesis, the \tilde{μ} in formula (5) of the reference paper. The test statistics follow |
stoch |
input |
FHweights |
input |
interim_ratio |
input |
error_spend |
input |
Lili Wang
Wang, L., Luo, X., & Zheng, C. (2021). A Simulation-free Group Sequential Design with Max-combo Tests in the Presence of Non-proportional Hazards. Journal of Pharmaceutical Statistics.
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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | ## Not run:
### Parameters
FHweights <- list(
c(0,0),
c(0,1),
c(1,0)
)
n_FHweights <- length(FHweights)
# stop when what proportion of the events have been observed.
fixed_death_p <- c(0.6, 0.7, 0.8)
interim_ratio <- c(fixed_death_p,1)
n_stage <- length(interim_ratio)
# treatment assignment.
p <- 1/2
# end of the study, chronological assuming it's on the alternative arm.
tau <- 18
# end of the accrual period, chronological.
R <- 14
# minimum potential follow-up time, not considering dropouts or other subject-specific censoring.
omega <- (tau-R)
# waiting time before the change point: can be the delayed effect or the crossing effect
eps <- 2
# event hazard of the control arm.
lambda <- log(2)/6
# hazard ratio after the change point eps under the alternative hypothesis.
theta <- 0.6
# event hazard for the treatment arm under the alternative hypothesis and after the change point eps.
lambda.trt <- lambda*theta
# type I error under the control.
alpha <- 0.025
# type II error under the alternative.
beta <- 0.1
# Obtain the cumulative errors spent at each stage
error_spend <- c(0.005, 0.01, 0.015, alpha)
# number of subintervals for a time unit
b <- 30
res <- GSMC_design(
FHweights,
interim_ratio,
error_spend,
eps,
p,
b,
tau,]
omega,
lambda,
lambda.trt,
rho,
gamma,
beta,
stoch = F
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.