| Title: | Sample Size and Power Calculations using the APPLE, SEPPLE, APPLE+ and SEPPLE+ Methods |
|---|---|
| Description: | Provides sample size and power calculations when the treatment time-lag effect is present and the lag duration is either homogeneous across the individual subject, or varies heterogeneously from individual to individual within a certain domain and following a specific pattern. The methods used are described in Xu, Z., Zhen, B., Park, Y., & Zhu, B. (2017) <doi:10.1002/sim.7157>. |
| Authors: | Zhenzhen Xu <[email protected]> , Boguang Zhen<[email protected]>, Yongsoek Park <[email protected]> and Bin Zhu <[email protected]> |
| Maintainer: | Bill Wheeler <[email protected]> |
| License: | GPL-2 |
| Version: | 1.1.3 |
| Built: | 2026-05-23 08:47:42 UTC |
| Source: | https://github.com/cran/DelayedEffect.Design |
Data for examples.
A data frame used in the examples.
data(data, package="DelayedEffect.Design") # Display some of the data data[1:5, ]data(data, package="DelayedEffect.Design") # Display some of the data data[1:5, ]
An R package for sample size and power calculation when the treatment time-lag
effect is present. The package incorporates two specific lag assumptions:
1. the lag duration is homogeneous across the individual subject;
2. the lag duration varies heterogeneously from individual to individual within a
certain domain and following a specific pattern.
The four new methods in this package for performing the sample size and power calculations are:
1. Analytic Power calculation method based on Piecewise weighted Log-rank tEst (APPLE),
2. Simulation-based Empirical Power calculation method based on Piecewise weighted Log-rank tEst (SEPPLE),
3. Analytic Power calculation method based on generalized Piecewise weighted Log-rank tEst
with random treatment time-lag effect (APPLE+),
4. Simulation-based Empirical Power calculation method based on generalized Piecewise weighted
Log-rank tEst with random treatment time-lag effect (SEPPLE+).
See the reference for details of these methods.
Specifically, APPLE and SEPPLE assume that the lag duration is homogeneous across the individual subject,
whereas APPLE and SEPPLE assume that the lag duration varies heterogeneously from individual to individual
or from study to study within a certain domain and following a specific pattern.
The functions for computing power corresponding to the above methods are pow.APPLE, pow.SEPPLE, pow.APPLE.plus,
pow.SEPPLE.plus and pow.SEPPLE.random.DE. These can be compared to pow.sim.logrk and pow.sim.logrk.rankdom.DE
which compute the power from a simulation-based algorithm using the regular log-rank test which ignores the
existence of lag effects.
The package also includes the function N.APPLE, N.APPLE.plus to back calculate the sample size given the power
and hazard ratio, and the functions HR.APPLE and HR.APPLE.plus to back calculate the hazard ratio given the
power and sample size, respectively, using the close-from APPLE and APPLE+ methods.
Zhenzhen Xu <[email protected]> , Boguang Zhen<[email protected]>, Yongsoek Park <[email protected]> and Bin Zhu <[email protected]>
Xu, Z., Park, Y., Zhen, B. & Zhu, B. (2017). Achieving optimal power of logrank test with random treatment time-lag effect. Biometrika. Under review.
Xu, Z., Zhen, B., Park, Y., & Zhu, B. (2017). Designing therapeutic cancer vaccine trials with delayed treatment effect. Statistics in medicine, 36(4), 592-605.
Compute the p-value based on the generalized piecewise weighted log-rank test when the treatment time-lag effect is present and the lag duration varies heterogeneously from individual to individual or from study to study, within a certain domain and following a uniform pattern.
GPW.logrank(data, obs.time, time.to.event, event.status, trt.group, tl, tu)GPW.logrank(data, obs.time, time.to.event, event.status, trt.group, tl, tu)
data |
Data frame |
obs.time |
Column name in |
time.to.event |
Column name in |
event.status |
Column name in |
trt.group |
Column name in |
tl |
Lower bound of delayed duration domain |
tu |
Upper bound of delayed duration domain |
The p-value of the test.
Zhenzhen Xu <[email protected]> , Boguang Zhen<[email protected]>, Yongsoek Park <[email protected]> and Bin Zhu <[email protected]>
Xu, Z., Park, Y., Zhen, B. & Zhu, B. (2017). Achieving optimal power of logrank test with random treatment time-lag effect. Biometrika. Under review.
Xu, Z., Zhen, B., Park, Y., & Zhu, B. (2017). Designing therapeutic cancer vaccine trials with delayed treatment effect. Statistics in medicine, 36(4), 592-605.
data(data, package="DelayedEffect.Design") GPW.logrank(data, "X", "time_to_event", "event_status", "Z", 30, 30*11)data(data, package="DelayedEffect.Design") GPW.logrank(data, "X", "time_to_event", "event_status", "Z", 30, 30*11)
Perform the post-delay hazard ratio calculation given power and sample size using the close-form APPLE method based on the piecewise weighted log-rank test when the treatment time-lag effect is present and the lag duration is homogeneous across the individual subject
HR.APPLE(lambda1, t1, p, N, tao, A, beta, ap=0.5, alpha=0.05)HR.APPLE(lambda1, t1, p, N, tao, A, beta, ap=0.5, alpha=0.05)
lambda1 |
Baseline hazard or NULL (see details) |
t1 |
Delayed duration or NULL (see details) |
p |
Proportion of subjects who survive beyond the delayed period or NULL (see details) |
N |
Sample size |
tao |
Total study duration |
A |
Total enrollment duration |
beta |
Type II error rate; Power=1-beta |
ap |
Experimental-control allocation ratio. The default is 0.5. |
alpha |
Type I error rate (two-sided). The default is 0.05. |
APPLE is an acronym for:
Analytic Power calculation method based on Piecewise weighted Log-rank tEst.
See the reference for details of this method.
Out of the three input parameters lambda1, t1 and p,
only two need to be specified, the remaining one will be computed
internally from the formula lambda1 = -log(p)/t1.
If all three are not NULL, then
lambda1 will be set to -log(p)/t1 regardless of the user input value.
The hazard ratio
Zhenzhen Xu <[email protected]>, Boguang Zhen<[email protected]>, Yongsoek Park <[email protected]> and Bin Zhu <[email protected]>
Xu, Z., Zhen, B., Park, Y., & Zhu, B. (2017). Designing therapeutic cancer vaccine trials with delayed treatment effect. Statistics in medicine, 36(4), 592-605.
lambda1 <- NULL t1 <- 183 p <- 0.7 N <- 200 tao <- 365*3 A <- 365 beta <- 0.2 HR.APPLE(lambda1, t1, p, N, tao, A, beta)lambda1 <- NULL t1 <- 183 p <- 0.7 N <- 200 tao <- 365*3 A <- 365 beta <- 0.2 HR.APPLE(lambda1, t1, p, N, tao, A, beta)
Perform the post-delay hazard ratio calculation given power and sample size using the close-form APPLE+ method based on the generalized piecewise weighted log-rank test when the treatment time-lag effect is present and the lag duration varies heterogeneously from individual to individual or from study to study, within a certain domain and following a specific pattern.
HR.APPLE.plus(lambda1, tl, tu, N, tao, A, beta, ap=0.5, alpha=0.05)HR.APPLE.plus(lambda1, tl, tu, N, tao, A, beta, ap=0.5, alpha=0.05)
lambda1 |
Baseline hazard |
tl |
Lower bound of delayed duration domain |
tu |
Upper bound of delayed duration domain |
N |
Sample size |
tao |
Total study duration |
A |
Total enrollment duration |
beta |
Type II error rate; Power=1-beta |
ap |
Experimental-control allocation ratio. The default is 0.5. |
alpha |
Type I error rate (two-sided). The default is 0.05. |
APPLE+ is an acronym for:
Analytic Power calculation method based on generalized Piecewise weighted Log-rank tEst
with random treatment time-lag effect.
See the reference for details of this method.
The hazard ratio
Zhenzhen Xu <[email protected]>, Boguang Zhen<[email protected]>, Yongsoek Park <[email protected]> and Bin Zhu <[email protected]>
Xu, Z., Park, Y., Zhen, B. & Zhu, B. (2017). Achieving optimal power of logrank test with random treatment time-lag effect. Biometrika. Under review.
Xu, Z., Zhen, B., Park, Y., & Zhu, B. (2017). Designing therapeutic cancer vaccine trials with delayed treatment effect. Statistics in medicine, 36(4), 592-605.
lambda1 <- 0.001982 tl <- 30 tu <- 30*11 N <- 200 tao <- 365*3 A <- 365 beta <- 0.2 HR.APPLE.plus(lambda1, tl, tu, N, tao, A, beta)lambda1 <- 0.001982 tl <- 30 tu <- 30*11 N <- 200 tao <- 365*3 A <- 365 beta <- 0.2 HR.APPLE.plus(lambda1, tl, tu, N, tao, A, beta)
Perform the sample size calculation given the power and post-delay hazard ratio using the closeform APPLE method based on the piecewise weighted log-rank test when the treatment time-lag effect is present and the lag duration is homogeneous across the individual subject
N.APPLE(lambda1, t1, p, HR, tao, A, beta, ap=0.5, alpha=0.05)N.APPLE(lambda1, t1, p, HR, tao, A, beta, ap=0.5, alpha=0.05)
lambda1 |
Baseline hazard or NULL (see details) |
t1 |
Delayed duration or NULL (see details) |
p |
Proportion of subjects who survive beyond the delayed period or NULL (see details) |
HR |
Post-delay hazard ratio, defined as the post-delay hazard rate of the treatment group compared to that of the control group |
tao |
Total study duration |
A |
Total enrollment duration |
beta |
Type II error rate; Power=1-beta |
ap |
Experimental-control allocation ratio. The default is 0.5. |
alpha |
Type I error rate (two-sided). The default is 0.05. |
APPLE is an acronym for:
Analytic Power calculation method based on Piecewise weighted Log-rank tEst.
See the reference for details of this method.
Out of the three input parameters lambda1, t1 and p,
only two need to be specified, the remaining one will be computed
internally from the formula lambda1 = -log(p)/t1.
If all three are not NULL, then
lambda1 will be set to -log(p)/t1 regardless of the user input value.
The sample size
Zhenzhen Xu <[email protected]>, Boguang Zhen<[email protected]>, Yongsoek Park <[email protected]> and Bin Zhu <[email protected]>
Xu, Z., Zhen, B., Park, Y., & Zhu, B. (2017). Designing therapeutic cancer vaccine trials with delayed treatment effect. Statistics in medicine, 36(4), 592-605.
lambda1 <- NULL t1 <- 183 p <- 0.7 HR <- 0.55 tao <- 365*3 A <- 365 beta <- 0.2 N.APPLE(lambda1, t1, p, HR, tao, A, beta)lambda1 <- NULL t1 <- 183 p <- 0.7 HR <- 0.55 tao <- 365*3 A <- 365 beta <- 0.2 N.APPLE(lambda1, t1, p, HR, tao, A, beta)
Perform the sample size calculation given the power and post-delay hazard ratio using the close-form APPLE+ method based on the generalized piecewise weighted log-rank test when the treatment time-lag effect is present and the lag duration varies heterogeneously from individual to individual or from study to study, within a certain domain and following a specific pattern.
N.APPLE.plus(lambda1, tl, tu, HR, tao, A, beta, ap=0.5, alpha=0.05)N.APPLE.plus(lambda1, tl, tu, HR, tao, A, beta, ap=0.5, alpha=0.05)
lambda1 |
Baseline hazard |
tl |
Lower bound of delayed duration domain |
tu |
Upper bound of delayed duration domain |
HR |
Post-delay hazard ratio after |
tao |
Total study duration |
A |
Total enrollment duration |
beta |
Type II error rate; Power=1-beta |
ap |
Experimental-control allocation ratio. The default is 0.5. |
alpha |
Type I error rate (two-sided). The default is 0.05. |
APPLE+ is an acronym for:
Analytic Power calculation method based on generalized Piecewise weighted Log-rank tEst
with random treatment time-lag effect.
See the reference for details of this method.
The sample size
Zhenzhen Xu <[email protected]>, Boguang Zhen<[email protected]>, Yongsoek Park <[email protected]> and Bin Zhu <[email protected]>
Xu, Z., Park, Y., Zhen, B. & Zhu, B. (2017). Achieving optimal power of logrank test with random treatment time-lag effect. Biometrika. Under review.
Xu, Z., Zhen, B., Park, Y., & Zhu, B. (2017). Designing therapeutic cancer vaccine trials with delayed treatment effect. Statistics in medicine, 36(4), 592-605.
lambda1 <- 0.001982 tl <- 30 tu <- 30*11 HR <- 1.3 tao <- 365*3 A <- 365 beta <- 0.2 N.APPLE.plus(lambda1, tl, tu, HR, tao, A, beta)lambda1 <- 0.001982 tl <- 30 tu <- 30*11 HR <- 1.3 tao <- 365*3 A <- 365 beta <- 0.2 N.APPLE.plus(lambda1, tl, tu, HR, tao, A, beta)
Perform the power calculation using the close-form APPLE method based on the piecewise weighted log-rank test when the treatment time-lag effect is present and the lag duration is homogeneous across the individual subject
pow.APPLE(lambda1, t1, p, N, HR, tao, A, ap=0.5, alpha=0.05)pow.APPLE(lambda1, t1, p, N, HR, tao, A, ap=0.5, alpha=0.05)
lambda1 |
Baseline hazard or NULL (see details) |
t1 |
Delayed duration or NULL (see details) |
p |
Proportion of subjects who survive beyond the delayed period or NULL (see details) |
N |
Sample size |
HR |
Post-delay hazard ratio, defined as the post-delay hazard rate of the treatment group compared to that of the control group |
tao |
Total study duration |
A |
Total enrollment duration |
ap |
Experimental-control allocation ratio. The default is 0.5. |
alpha |
Type I error rate (two-sided). The default is 0.05. |
APPLE is an acronym for:
Analytic Power calculation method based on Piecewise weighted Log-rank tEst.
See the reference for details of this method.
Out of the three input parameters lambda1, t1 and p,
only two need to be specified, the remaining one will be computed
internally from the formula lambda1 = -log(p)/t1.
If all three are not NULL, then
lambda1 will be set to -log(p)/t1 regardless of the user input value.
The power
Zhenzhen Xu <[email protected]>, Boguang Zhen<[email protected]>, Yongsoek Park <[email protected]> and Bin Zhu <[email protected]>
Xu, Z., Zhen, B., Park, Y., & Zhu, B. (2017). Designing therapeutic cancer vaccine trials with delayed treatment effect. Statistics in medicine, 36(4), 592-605.
N.APPLE, HR.APPLE, pow.SEPPLE, pow.sim.logrk
lambda1 <- NULL t1 <- 183 p <- 0.7 N <- 200 HR <- 0.55 tao <- 365*3 A <- 365 pow.APPLE(lambda1, t1, p, N, HR, tao, A)lambda1 <- NULL t1 <- 183 p <- 0.7 N <- 200 HR <- 0.55 tao <- 365*3 A <- 365 pow.APPLE(lambda1, t1, p, N, HR, tao, A)
Perform the power calculation using the close-form APPLE+ method based on the generalized piecewise weighted log-rank test when the treatment time-lag effect is present and the lag duration varies heterogeneously from individual to individual or from study to study, within a certain domain and following a specific pattern.
pow.APPLE.plus(lambda1, tl, tu, N, HR, tao, A, ap=0.5, alpha=0.05)pow.APPLE.plus(lambda1, tl, tu, N, HR, tao, A, ap=0.5, alpha=0.05)
lambda1 |
Baseline hazard |
tl |
Lower bound of delayed duration domain |
tu |
Upper bound of delayed duration domain |
N |
Sample size |
HR |
Post-delay hazard ratio after |
tao |
Total study duration |
A |
Total enrollment duration |
ap |
Experimental-control allocation ratio. The default is 0.5. |
alpha |
Type I error rate (two-sided). The default is 0.05. |
APPLE+ is an acronym for:
Analytic Power calculation method based on generalized Piecewise weighted Log-rank tEst
with random treatment time-lag effect.
See the reference for details of this method.
The power
Zhenzhen Xu <[email protected]>, Boguang Zhen<[email protected]>, Yongsoek Park <[email protected]> and Bin Zhu <[email protected]>
Xu, Z., Park, Y., Zhen, B. & Zhu, B. (2017). Achieving optimal power of logrank test with random treatment time-lag effect. Biometrika. Under review.
Xu, Z., Zhen, B., Park, Y., & Zhu, B. (2017). Designing therapeutic cancer vaccine trials with delayed treatment effect. Statistics in medicine, 36(4), 592-605.
lambda1 <- 0.001982 tl <- 30 tu <- 30*11 N <- 200 HR <- 1.3 tao <- 365*3 A <- 365 pow.APPLE.plus(lambda1, tl, tu, N, HR, tao, A)lambda1 <- 0.001982 tl <- 30 tu <- 30*11 N <- 200 HR <- 1.3 tao <- 365*3 A <- 365 pow.APPLE.plus(lambda1, tl, tu, N, HR, tao, A)
Perform the power calculation using the numeric SEPPLE method based on the piecewise weighted log-rank test when the treatment time-lag effect is present and the lag duration is homogeneous across the individual subject
pow.SEPPLE(lambda1, t1, p, N, HR, tao, A, ap=0.5, alpha=0.05, nsim=10000)pow.SEPPLE(lambda1, t1, p, N, HR, tao, A, ap=0.5, alpha=0.05, nsim=10000)
lambda1 |
Baseline hazard or NULL (see details) |
t1 |
Delayed duration or NULL (see details) |
p |
Proportion of subjects who survive beyond the delayed period or NULL (see details) |
N |
Sample size |
HR |
Post-delay hazard ratio, defined as the post-delay hazard rate of the treatment group compared to that of the control group |
tao |
Total study duration |
A |
Total enrollment duration |
ap |
Experimental-control allocation ratio. The default is 0.5. |
alpha |
Type I error rate (two-sided). The default is 0.05. |
nsim |
Number of simulations. The default is 10000. |
SEPPLE is an acronym for:
Simulation-based Empirical Power calculation method based on Piecewise weighted Log-rank
tEst. See the reference for details of this method.
Out of the three input parameters lambda1, t1 and p,
only two need to be specified, the remaining one will be computed
internally from the formula lambda1 = -log(p)/t1.
If all three are not NULL, then
lambda1 will be set to -log(p)/t1 regardless of the user input value.
The power
Zhenzhen Xu <[email protected]> , Boguang Zhen<[email protected]>, Yongsoek Park <[email protected]> and Bin Zhu <[email protected]>
Xu, Z., Zhen, B., Park, Y., & Zhu, B. (2017). Designing therapeutic cancer vaccine trials with delayed treatment effect. Statistics in medicine, 36(4), 592-605.
lambda1 <- NULL t1 <- 183 p <- 0.7 N <- 200 HR <- 0.55 tao <- 365*3 A <- 365 pow.SEPPLE(lambda1, t1, p, N, HR, tao, A, nsim=1000)lambda1 <- NULL t1 <- 183 p <- 0.7 N <- 200 HR <- 0.55 tao <- 365*3 A <- 365 pow.SEPPLE(lambda1, t1, p, N, HR, tao, A, nsim=1000)
Perform the power calculation using the numeric SEPPLE+ method based on the generalized piecewise weighted log-rank test when the treatment time-lag effect is present and the lag duration varies heterogeneously from individual to individual or from study to study, within a certain domain and following a specific pattern.
pow.SEPPLE.plus(lambda1, tl, tu, N, HR, tao, A, dist="uniform", shape1=NULL, shape2=NULL, ap=0.5, alpha=0.05, nsim=10000)pow.SEPPLE.plus(lambda1, tl, tu, N, HR, tao, A, dist="uniform", shape1=NULL, shape2=NULL, ap=0.5, alpha=0.05, nsim=10000)
lambda1 |
Baseline hazard |
tl |
Lower bound of delayed duration domain |
tu |
Upper bound of delayed duration domain |
N |
Sample size |
HR |
Post-delay hazard ratio after tu, defined as the post-delay hazard rate of the treatment group compared to that of the control group |
tao |
Total study duration |
A |
Total enrollment duration |
dist |
One of "uniform", "beta" or "gamma", for the lag distribution |
shape1 |
NULL or a positive parameter value for the |
shape2 |
NULL or a positive parameter value for the |
ap |
Experimental-control allocation ratio. The default is 0.5. |
alpha |
Type I error rate (two-sided). The default is 0.05. |
nsim |
Number of simulations. The default is 10000. |
SEPPLE+ is an acronym for:
Simulation-based Empirical Power calculation method based on generalized Piecewise weighted Log-rank
tEst with random treatment time-lag effect.
See the reference for details of this method.
The power
Zhenzhen Xu <[email protected]> , Boguang Zhen<[email protected]>, Yongsoek Park <[email protected]> and Bin Zhu <[email protected]>
Xu, Z., Park, Y., Zhen, B. & Zhu, B. (2017). Achieving optimal power of logrank test with random treatment time-lag effect. Biometrika. Under review.
Xu, Z., Zhen, B., Park, Y., & Zhu, B. (2017). Designing therapeutic cancer vaccine trials with delayed treatment effect. Statistics in medicine, 36(4), 592-605.
pow.SEPPLE.random.DE, pow.sim.logrk.random.DE
lambda1 <- 0.001982 tl <- 30 tu <- 30*11 N <- 200 HR <- 0.55 tao <- 365*3 A <- 365 shape1 <- 5 shape2 <- 5 pow.SEPPLE.plus(lambda1, tl, tu, N, HR, tao, A, dist="beta", shape1=shape1, shape2=shape2, nsim=1000)lambda1 <- 0.001982 tl <- 30 tu <- 30*11 N <- 200 HR <- 0.55 tao <- 365*3 A <- 365 shape1 <- 5 shape2 <- 5 pow.SEPPLE.plus(lambda1, tl, tu, N, HR, tao, A, dist="beta", shape1=shape1, shape2=shape2, nsim=1000)
Perform the power calculation using the numeric SEPPLE method based on the piecewise weighted log-rank test when the treatment time-lag effect is present and the lag duration varies heterogeneously from individual to individual or from study to study, within a certain domain and following a specific pattern. The purpose of this function is to evaluate the property of SEPPLE which assumes the lag duration is homogeneous across the individual subject, when applied under the random scenario where the lag duration, in fact, varies heterogeneously.
pow.SEPPLE.random.DE(lambda1, tl, tu, N, HR, tao, A, t.fixed, dist="uniform", shape1=NULL, shape2=NULL, ap=0.5, alpha=0.05, nsim=10000)pow.SEPPLE.random.DE(lambda1, tl, tu, N, HR, tao, A, t.fixed, dist="uniform", shape1=NULL, shape2=NULL, ap=0.5, alpha=0.05, nsim=10000)
lambda1 |
Baseline hazard |
tl |
Lower bound of delayed duration domain |
tu |
Upper bound of delayed duration domain |
N |
Sample size |
HR |
Post-delay hazard ratio after |
tao |
Total study duration |
A |
Total enrollment duration |
t.fixed |
Fixed duration in SEPPLE |
dist |
One of "uniform", "beta" or "gamma", for the lag distribution |
shape1 |
NULL or a positive parameter value for the |
shape2 |
NULL or a positive parameter value for the |
ap |
Experimental-control allocation ratio. The default is 0.5. |
alpha |
Type I error rate (two-sided). The default is 0.05. |
nsim |
Number of simulations. The default is 10000. |
SEPPLE+ is an acronym for:
Simulation-based Empirical Power calculation method based on generalized Piecewise weighted Log-rank
tEst with random treatment time-lag effect.
See the reference for details of this method.
The power
Zhenzhen Xu <[email protected]> , Boguang Zhen<[email protected]>, Yongsoek Park <[email protected]> and Bin Zhu <[email protected]>
Xu, Z., Park, Y., Zhen, B. & Zhu, B. (2017). Achieving optimal power of logrank test with random treatment time-lag effect. Biometrika. Under review.
Xu, Z., Zhen, B., Park, Y., & Zhu, B. (2017). Designing therapeutic cancer vaccine trials with delayed treatment effect. Statistics in medicine, 36(4), 592-605.
pow.SEPPLE.plus, pow.sim.logrk.random.DE
lambda1 <- 0.001982 tl <- 30 tu <- 30*11 N <- 200 HR <- 0.55 tao <- 365*3 A <- 365 t.fixed <- (tl+tu)/2 shape1 <- 5 shape2 <- 5 pow.SEPPLE.random.DE(lambda1, tl, tu, N, HR, tao, A, t.fixed, dist="beta", shape1=shape1, shape2=shape2, nsim=1000)lambda1 <- 0.001982 tl <- 30 tu <- 30*11 N <- 200 HR <- 0.55 tao <- 365*3 A <- 365 t.fixed <- (tl+tu)/2 shape1 <- 5 shape2 <- 5 pow.SEPPLE.random.DE(lambda1, tl, tu, N, HR, tao, A, t.fixed, dist="beta", shape1=shape1, shape2=shape2, nsim=1000)
Perform the power calculation using a simulation-based method based on the regular log-rank test when the treatment time-lag effect is present and the lag duration is homogeneous across the individual subject
pow.sim.logrk(lambda1, t1, p, N, HR, tao, A, ap=0.5, alpha=0.05, nsim=10000)pow.sim.logrk(lambda1, t1, p, N, HR, tao, A, ap=0.5, alpha=0.05, nsim=10000)
lambda1 |
Baseline hazard or NULL (see details) |
t1 |
Delayed duration or NULL (see details) |
p |
Proportion of subjects who survive beyond the delayed period or NULL (see details) |
N |
Sample size |
HR |
Post-delay hazard ratio, defined as the post-delay hazard rate of the treatment group compared to that of the control group |
tao |
Total study duration |
A |
Total enrollment duration |
ap |
Experimental-control allocation ratio. The default is 0.5. |
alpha |
Type I error rate (two-sided). The default is 0.05. |
nsim |
Number of simulations. The default is 10000. |
Out of the three input parameters lambda1, t1 and p,
only two need to be specified, the remaining one will be computed
internally from the formula lambda1 = -log(p)/t1.
If all three are not NULL, then
lambda1 will be set to -log(p)/t1 regardless of the user input value.
The power
Zhenzhen Xu <[email protected]>, Boguang Zhen<[email protected]>, Yongsoek Park <[email protected]> and Bin Zhu <[email protected]>
Xu, Z., Zhen, B., Park, Y., & Zhu, B. (2017). Designing therapeutic cancer vaccine trials with delayed treatment effect. Statistics in medicine, 36(4), 592-605.
lambda1 <- NULL t1 <- 183 p <- 0.7 N <- 200 HR <- 0.55 tao <- 365*3 A <- 365 pow.sim.logrk(lambda1, t1, p, N, HR, tao, A, nsim=1000)lambda1 <- NULL t1 <- 183 p <- 0.7 N <- 200 HR <- 0.55 tao <- 365*3 A <- 365 pow.sim.logrk(lambda1, t1, p, N, HR, tao, A, nsim=1000)
Perform the power calculation using a simulation-based method based on the regular log-rank test when the treatment time-lag effect is present and the lag duration varies heterogeneously from individual to individual or from study to study, within a certain domain and following a specific pattern.
pow.sim.logrk.random.DE(lambda1, tl, tu, N, HR, tao, A, dist="uniform", shape1=NULL, shape2=NULL, ap=0.5, alpha=0.05, nsim=10000)pow.sim.logrk.random.DE(lambda1, tl, tu, N, HR, tao, A, dist="uniform", shape1=NULL, shape2=NULL, ap=0.5, alpha=0.05, nsim=10000)
lambda1 |
Baseline hazard |
tl |
Lower bound of delayed duration domain |
tu |
Upper bound of delayed duration domain |
N |
Sample size |
HR |
Post-delay hazard ratio after |
tao |
Total study duration |
A |
Total enrollment duration |
dist |
One of "uniform", "beta" or "gamma", for the lag distribution |
shape1 |
NULL or a positive parameter value for the |
shape2 |
NULL or a positive parameter value for the |
ap |
Experimental-control allocation ratio. The default is 0.5. |
alpha |
Type I error rate (two-sided). The default is 0.05. |
nsim |
Number of simulations. The default is 10000. |
The regular log-rank test is used here
The power
Zhenzhen Xu <[email protected]> , Boguang Zhen<[email protected]>, Yongsoek Park <[email protected]> and Bin Zhu <[email protected]>
Xu, Z., Park, Y., Zhen, B. & Zhu, B. (2017). Achieving optimal power of logrank test with random treatment time-lag effect. Biometrika. Under review.
Xu, Z., Zhen, B., Park, Y., & Zhu, B. (2017). Designing therapeutic cancer vaccine trials with delayed treatment effect. Statistics in medicine, 36(4), 592-605.
pow.SEPPLE.plus, pow.SEPPLE.random.DE
lambda1 <- 0.001982 tl <- 30 tu <- 30*11 N <- 200 HR <- 0.55 tao <- 365*3 A <- 365 shape1 <- 5 shape2 <- 5 pow.sim.logrk.random.DE(lambda1, tl, tu, N, HR, tao, A, dist="beta", shape1=shape1, shape2=shape2, nsim=1000)lambda1 <- 0.001982 tl <- 30 tu <- 30*11 N <- 200 HR <- 0.55 tao <- 365*3 A <- 365 shape1 <- 5 shape2 <- 5 pow.sim.logrk.random.DE(lambda1, tl, tu, N, HR, tao, A, dist="beta", shape1=shape1, shape2=shape2, nsim=1000)