The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Package {p2oncology}


Version: 0.1.1
Title: Single Arm Phase 2 Oncology Trial
Author: Ping Gao [aut, cre]
Maintainer: Ping Gao <support@innovatiostat.com>
Description: Single arm phase 2 oncology trial. For more details see P. Gao (2024) <doi:10.1080/10543406.2024.2341673>.
Depends: clinfun, mvtnorm, doParallel
License: MIT + file LICENSE
Encoding: UTF-8
Imports: foreach, dplyr, jsonlite
Config/roxygen2/version: 8.0.0
URL: https://github.com/innovatiostat/rcode
BugReports: https://github.com/innovatiostat/rcode/issues
NeedsCompilation: no
Packaged: 2026-09-04 01:08:02 UTC; chengboqin
Repository: CRAN
Date/Publication: 2026-09-14 19:50:02 UTC

Three-stage design

Description

Three-stage design

Usage

EXP_3_stg_sz(alpha, beta, p_0, p_low, p_1, d_23_cut)

Arguments

alpha

One-sided type I error.

beta

Type II error.

p_0

Response rate indicating low activity with insufficient clinical benefit.

p_low

Minimally clinically beneficial response rate.

p_1

Assumed response rate.

d_23_cut

Min(n3-n2) sets the minimal difference between n3 and n2 for the design.

Value

n1: Number of patients at first look. n1 for the three-stage design is the from Simon’s design with p=p_1.

n_2: Number of patients at second look. n_2 for the three-stage design is the n1 from Simon’s design with p=p_low.

r1: If no more than r1 responses are observed at the first look, then the trial would be stopped for futility.

r_2: The null hypothesis will be rejected if at least r_2 responses are observed at the end of the trial.

EN(p0) is the expected sample size under the null hypothesis.

PET(p0) is the probability of early termination under the null hypothesis.

PET_p is the probability of early termination under p=p_1.

PET_p_low is the probability of early termination under p=p_low.

power_p_1 is the power under p=p_1.

power_p_low is the power under p=p_low.

Type I error is the probability of rejecting the null hypothesis under p<=p_0.

The minimax design has the smallest n_2 among all possible choices of (n1,r1,n_2,r_2).

The optimal design has the smallest EN(p0) among all possible choices of (n1,r1,n_2,r_2).

The n1 and n_2 for the average design is the average of n1's and n_2's from the minimax and the optimal designs.

References

R. Simon. Optimal Two-Stage Designs for Phase II Clinical Trials. Controlled Clinical Trials 10:1-10 (1989).

P. Gao & W. Zhang (15 Apr 2024): Adaptive sequential design for phase II single-arm oncology trials: an expansion of Simon’s design, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2341673. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2341673.

Examples


EXP_3_stg_sz(alpha=c(0.001,0.024),beta=0.1,p_0=0.2,p_low=0.33,p_1=0.4,d_23_cut=5)



Final analysis: two stage design, with sample size change

Description

Final analysis: two stage design, with sample size change

Usage

asd_ci_est_one_arm_2_stage(p_0, n_1, n_2, r_1_e, r_2, n_new, x_1, x_new, alpha)

Arguments

p_0

Response rate indicating low activity with insufficient clinical benefit.

n_1

Number of patients at first look.

n_2

Number of patients at second look.

r_1_e

The trial would be stopped for superiority if at least r_1_e responses are observed at the first look.

r_2

If no more than r_2 responses are observed at the second look, then the null hypothesis will not be rejected.

n_new

New sample size after the interim analysis.

x_1

Number of responses at the first look.

x_new

Number of responses at the final visit.

alpha

One-sided type I error.

Value

UL: upper limit of confidence interval.

LL: lower limit of confidence interval.

The results with continuity correction are not necessarily different from those with continuity correction.

The need for continuity correction can be determined through simulations on type I error (see Gao, Zhang, 2004).

References

P. Gao & W. Zhang (15 Apr 2024): Adaptive sequential design for phase II single-arm oncology trials: an expansion of Simon’s design, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2341673. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2341673.

Gao, P., L. Liu, and C. Mehta. 2013 Oct 15. Exact inference for adaptive group sequential designs. Statistics in Medicine 32(23):3991–4005. doi:10.1002/sim.5847.

Examples

asd_ci_est_one_arm_2_stage( p_0=0.2,n_1=100,n_2=105,r_1_e=33,r_2=29,n_new=115,
x_1=28,x_new=34,alpha=0.025)


Final analysis: three stage design, with sample size change

Description

Final analysis: three stage design, with sample size change

Usage

asd_ci_est_one_arm_3_stage(
  p_0,
  n_2,
  n_3,
  r_2_e,
  r_2,
  r_3,
  n_new,
  x_2,
  x_new,
  alpha
)

Arguments

p_0

Response rate indicating low activity with insufficient clinical benefit.

n_2

Number of patients at second look.

n_3

Number of patients at third look.

r_2_e

The trial would be stopped for superiority if at least r_2_e responses are observed at the second look. If r_2_e was not used in the design, enter NA.

r_2

If no more than r_2 responses are observed at the second look, then the trial would be stopped for futility.

r_3

If no more than r_3 responses are observed at the third look, then the null hypothesis will not be rejected.

n_new

New sample size after the interim analysis (at the second look).

x_2

Number of responses at the second look.

x_new

Number of responses at the final visit.

alpha

One-sided type I error.

Value

UL: upper limit of confidence interval.

LL: lower limit of confidence interval.

The results with continuity correction are not necessarily different from those with continuity correction.

The need for continuity correction can be determined through simulations on type I error (see Gao, Zhang, 2004).

References

P. Gao & W. Zhang (15 Apr 2024): Adaptive sequential design for phase II single-arm oncology trials: an expansion of Simon’s design, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2341673. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2341673.

Gao, P., L. Liu, and C. Mehta. 2013 Oct 15. Exact inference for adaptive group sequential designs. Statistics in Medicine 32(23):3991–4005. doi:10.1002/sim.5847.

Examples

asd_ci_est_one_arm_3_stage( p_0=0.2,n_2=105,n_3=110,r_2_e=33,r_3=29,n_new=115,
x_2=28,x_new=34,alpha=0.025)


Final analysis: two stage design, no sample size change

Description

Final analysis: two stage design, no sample size change

Usage

gsd_ci_est_2_stage(p_0, n_1, n_2, r_1_e, r_2, x_last, last_vt, alpha)

Arguments

p_0

Response rate indicating low activity with insufficient clinical benefit.

n_1

Number of patients at first look.

n_2

Number of patients at second look.

r_1_e

The trial would be stopped for superiority if at least r2e responses are observed at the second look.

r_2

If no more than r_2 responses are observed at the second look, then the null hypothesis will not be rejected.

x_last

Number of responses at the final visit.

last_vt

1.

alpha

One-sided type I error.

Value

UL: upper limit of confidence interval.

LL: lower limit of confidence interval.

The results with continuity correction are not necessarily different from those with continuity correction.

The need for continuity correction can be determined through simulations on type I error (see Gao, Zhang, 2004).

References

P. Gao & W. Zhang (15 Apr 2024): Adaptive sequential design for phase II single-arm oncology trials: an expansion of Simon’s design, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2341673. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2341673.

Gao, P., L. Liu, and C. Mehta. 2013 Oct 15. Exact inference for adaptive group sequential designs. Statistics in Medicine 32(23):3991–4005. doi:10.1002/sim.5847.

Examples

gsd_ci_est_2_stage(p_0=0.2,n_1=100,n_2=105,r_1_e=NA,r_2=29,x_last=31,last_vt=1,alpha=0.025)


Final analysis: three stage design, no sample size change

Description

Final analysis: three stage design, no sample size change

Usage

gsd_ci_est_3_stage(p_0, n_2, n_3, r_2_e, r_3, x_last, last_vt, alpha)

Arguments

p_0

Response rate indicating low activity with insufficient clinical benefit.

n_2

Number of patients at second look.

n_3

Number of patients at third look.

r_2_e

The trial would be stopped for superiority if at least r_2_e responses are observed at the second look. If r_2_e was not used in the design, enter NA.

r_3

If no more than r_3 responses are observed at the third look, then the null hypothesis will not be rejected.

x_last

Number of responses at the final visit.

last_vt

1.

alpha

One-sided type I error.

Value

UL: upper limit of confidence interval.

LL: lower limit of confidence interval.

The results with continuity correction are not necessarily different from those with continuity correction.

The need for continuity correction can be determined through simulations on type I error (see Gao, Zhang, 2004).

References

P. Gao & W. Zhang (15 Apr 2024): Adaptive sequential design for phase II single-arm oncology trials: an expansion of Simon’s design, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2341673. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2341673.

Gao, P., L. Liu, and C. Mehta. 2013 Oct 15. Exact inference for adaptive group sequential designs. Statistics in Medicine 32(23):3991–4005. doi:10.1002/sim.5847.

Examples

gsd_ci_est_3_stage(p_0=0.2,n_2=100,n_3=105,r_2_e=31,r_3=29,x_last=31,last_vt=3,alpha=0.025)


Two-stage design: the hybrid design

Description

Two-stage design: the hybrid design

Usage

hybrid_sz(alpha, beta, p_0, p_low, p_1, d_12_cut)

Arguments

alpha

One-sided type I error.

beta

Type II error.

p_0

Response rate indicating low activity with insufficient clinical benefit.

p_low

Minimally clinically beneficial response rate.

p_1

Assumed response rate.

d_12_cut

Min(n2-n1) sets the minimal difference between n2 and n1 for the design.

Value

n1: Number of patients at first look.

n_2: Number of patients at second look. n_2 is also the total sample size.

r1: If no more than r1 responses are observed at the first look, then the trial would be stopped for futility.

r_2: The null hypothesis will be rejected if at least r_2 responses are observed at the end of the trial.

EN(p0) is the expected sample size under the null hypothesis.

PET(p0) is the probability of early termination under the null hypothesis.

PET_p is the probability of early termination under p=p_1.

PET_p_low is the probability of early termination under p=p_low.

power_p is the power under p=p_1.

power_p_low is the power under p=p_low.

Type I error is the probability of rejecting the null hypothesis under p<=p_0.

The minimax design has the smallest n2 among all possible choices of (n1,r1,n_2,r_2).

The optimal design has the smallest EN(p0) ) among all possible choices of (n1,r1,n_2,r_2).

The n1 for the average design is the average of n1's from the minimax and the optimal designs.

References

R. Simon. Optimal Two-Stage Designs for Phase II Clinical Trials. Controlled Clinical Trials 10:1-10 (1989).

P. Gao & W. Zhang (15 Apr 2024): Adaptive sequential design for phase II single-arm oncology trials: an expansion of Simon’s design, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2341673. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2341673.

Examples

hybrid_sz(alpha=c(0.001,0.024),beta=0.1,p_0=0.2,p_low=0.4,p_1=0.55,d_12_cut=0)


The interim analysis can be conducted for both two-stage and three-stage designs

Description

The interim analysis can be conducted for both two-stage and three-stage designs

Usage

interim_analysis(p_0, r_final, n_inter, n_final, x_inter, beta, N_max)

Arguments

p_0

Response rate indicating low activity with insufficient clinical benefit.

r_final

For two-stage designs, r_final=r2. For the three-stage design, r_final=r3.

n_inter

Number of patients at the interim look. For two-stage designs, n_inter=n1. For the three-stage design, n_inter=n2.

n_final

For two-stage designs, n_inter=n2. For the three-stage design, n_inter=n3.

x_inter

Number of responses observed at the interim look.

beta

The conditional type II error. 1-beta is the desired conditional power.

N_max

Pre-selected maximum sample size.

Value

n_new: is the new sample size.

r_new (without continuity correction) and r_new (with continuity correction) are thresholds such that the null hypothesis will be rejected at n_new if at least r_new responses are observed. Simulations on type I error will help to determine if continuity correction is needed.

References

R. Simon. Optimal Two-Stage Designs for Phase II Clinical Trials. Controlled Clinical Trials 10:1-10 (1989).

P. Gao & W. Zhang (15 Apr 2024): Adaptive sequential design for phase II single-arm oncology trials: an expansion of Simon’s design, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2341673. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2341673.

P. Gao, J.H. Ware, C. Mehta, (2008), Sample size re-estimation for adaptive sequential designs. Journal of Biopharmaceutical Statistics, 18: 1184–1196, 2008.

Examples

interim_analysis(p_0=0.2,r_final=17,n_inter=22,n_final=56,x_inter=7,beta=0.1,N_max=120)

Two-stage design: the midpoint design

Description

Two-stage design: the midpoint design

Usage

midpnt_sz(alpha, beta, p_0, p_low, p_1, q, d_12_cut)

Arguments

alpha

One-sided type I error.

beta

Type II error.

p_0

Response rate indicating low activity with insufficient clinical benefit.

p_low

Minimally clinically beneficial response rate.

p_1

Assumed response rate.

q

0<q<1.

d_12_cut

Min(n2-n1) sets the minimal difference between n2 and n1 for the design.

Value

n1: Number of patients at first look.

n_2: Number of patients at second look. n_2 is also the total sample size.

r1: If no more than r1 responses are observed at the first look, then the trial would be stopped for futility.

r_2: The null hypothesis will be rejected if at least r_2 responses are observed at the end of the trial.

EN(p0) is the expected sample size under the null hypothesis.

PET(p0) is the probability of early termination under the null hypothesis.

PET_p is the probability of early termination under p=p_1.

PET_p_low is the probability of early termination under p=p_low.

power_p is the power under p=p_1.

power_p_low is the power under p=p_low.

Type I error is the probability of rejecting the null hypothesis under p<=p_0.

The minimax design has the smallest n_2 among all possible choices of (n1,r1,n2,r2).

The optimal design has the smallest EN(p_0) ) among all possible choices of (n1,r1,n_2,r_2).

The n1 for the average design is the average of n1's from the minimax and the optimal designs.

References

R. Simon. Optimal Two-Stage Designs for Phase II Clinical Trials. Controlled Clinical Trials 10:1-10 (1989).

P. Gao & W. Zhang (15 Apr 2024): Adaptive sequential design for phase II single-arm oncology trials: an expansion of Simon’s design, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2341673. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2341673.

Examples

midpnt_sz(alpha=c(0.001,0.024),beta=0.1,p_0=0.2,p_low=0.33,p_1=0.4,q=0.5,d_12_cut=5)


Simulations: adaptive three stage design

Description

Simulations: adaptive three stage design

Usage

one_arm_ad_3_stg_binary(
  p_1,
  p_0,
  n_1,
  r_1,
  n_2,
  r_2,
  r_2_e = NA,
  n_3,
  r_3,
  N_max,
  beta,
  sim_num
)

Arguments

p_1

The assumed response rate.

p_0

Response rate indicating low activity with insufficient clinical benefit.

n_1

Number of patients at first look.

r_1

If no more than r_1 responses are observed at the first look, then the trial would be stopped for futility.

n_2

Number of patients at second look.

r_2

If no more than r_2 responses are observed at the second look, then the trial would be stopped for futility.

r_2_e

The trial would be stopped for superiority if at least r_2_e responses are observed at the second look. If r_2_e is not used in the design, enter NA.

n_3

Number of patients at third look.

r_3

If no more than r_3 responses are observed at the third look, then the null hypothesis will not be rejected.

N_max

Maximum sample size for the trial.

beta

Type II error. The target power is 1-beta.

sim_num

Purpose of simulation: To verify type I error control by setting p_1=p_0, To evaluate the operating characteristics of the adaptive design and to determine if continuity correction is necessary.

Value

Average sample size is EN(p_1).

Rate of termination is PET(p_1)

If rejection rate without continuity correction does not exceed alpha, the continuity correction is not needed for this group of parameters p_0,n_1,r_1,n_2,r_2,r_2_e,n_3,r_3. Otherwise, continuity correction should be applied.

References

R. Simon. Optimal Two-Stage Designs for Phase II Clinical Trials. Controlled Clinical Trials 10:1-10 (1989).

P. Gao & W. Zhang (15 Apr 2024): Adaptive sequential design for phase II single-arm oncology trials: an expansion of Simon’s design, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2341673. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2341673.

P. Gao, J.H. Ware, C. Mehta, (2008), Sample size re-estimation for adaptive sequential designs. Journal of Biopharmaceutical Statistics, 18: 1184–1196, 2008.

Examples


one_arm_ad_3_stg_binary(p_1=0.2,p_0=0.2,n_1=37,r_1=8,n_2=100,r_2=22,r_2_e=33,
n_3=105,r_3=29,N_max=150,beta=0.1,sim_num=100000)



Simulations: adaptive two stage design

Description

Simulations: adaptive two stage design

Usage

one_arm_ad_two_stg_binary(
  p_1,
  p_0,
  n_1,
  r_1,
  r_1_e = NA,
  n_2,
  r_2,
  N_max,
  beta,
  sim_num
)

Arguments

p_1

The assumed response rate.

p_0

Response rate indicating low activity with insufficient clinical benefit.

n_1

Number of patients at first look.

r_1

If no more than r_1 responses are observed at the first look, then the trial would be stopped for futility.

r_1_e

The trial would be stopped for superiority if at least r_1_e responses are observed at the first look. If r_1_e is not used in the design, enter NA.

n_2

Number of patients at second look.

r_2

If no more than r_2 responses are observed at the second look, then the null hypothesis will be rejected.

N_max

Maximum sample size for the trial.

beta

Type II error. The target power is 1-beta.

sim_num

Purpose of simulation: To verify type I error control by setting p_1=p_0, To evaluate the operating characteristics of the adaptive design and to determine if continuity correction is necessary.

Value

Average sample size is EN(p_1).

Rate of termination is PET(p_1)

If rejection rate without continuity correction does not exceed alpha, the continuity correction is not needed for this group of parameters p_0,n_1,r_1,r_1_e,n_2,r_2. Otherwise, continuity correction should be applied.

References

R. Simon. Optimal Two-Stage Designs for Phase II Clinical Trials. Controlled Clinical Trials 10:1-10 (1989).

P. Gao & W. Zhang (15 Apr 2024): Adaptive sequential design for phase II single-arm oncology trials: an expansion of Simon’s design, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2341673. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2341673.

P. Gao, J.H. Ware, C. Mehta, (2008), Sample size re-estimation for adaptive sequential designs. Journal of Biopharmaceutical Statistics, 18: 1184–1196, 2008.

Examples


one_arm_ad_two_stg_binary(p_1=0.2,p_0=0.2,n_1=37,r_1=9,r_1_e=NA,n_2=53,r_2=16,
N_max=140,beta=0.1,sim_num=100000)



Simulations: Two stage fixed expanded Simon's design: either hybrid or mid-point design

Description

Simulations: Two stage fixed expanded Simon's design: either hybrid or mid-point design

Usage

one_arm_rej_2_stg_binary(p_1, p_0, n_1, r_1_f, r_1_e = NA, n_2, r_2, sim_num)

Arguments

p_1

The assumed response rate.

p_0

Response rate indicating low activity with insufficient clinical benefit.

n_1

Number of patients at first look.

r_1_f

If no more than r_1 responses are observed at the first look, then the trial would be stopped for futility.

r_1_e

The trial would be stopped for superiority if at least r_1_e responses are observed at the first look. If r_1_e is not used in the design, enter NA.

n_2

Number of patients at second look.

r_2

If no more than r_2 responses are observed at the second look, then the null hypothesis will be rejected.

sim_num

Purpose of simulation: To verify type I error control by setting p_1=p_0, To verify the parameters n_1,r_1_f,r_1_e,n_2,r_2 are correctly chosen, such that the rejection rate matches that from the design table from either the hybrid design or the mid-point design.

Value

Average sample size is EN(p_1).

Rate of termination is PET(p_1)

References

R. Simon. Optimal Two-Stage Designs for Phase II Clinical Trials. Controlled Clinical Trials 10:1-10 (1989).

P. Gao & W. Zhang (15 Apr 2024): Adaptive sequential design for phase II single-arm oncology trials: an expansion of Simon’s design, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2341673. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2341673.

P. Gao, J.H. Ware, C. Mehta, (2008), Sample size re-estimation for adaptive sequential designs. Journal of Biopharmaceutical Statistics, 18: 1184–1196, 2008.

Examples


one_arm_rej_2_stg_binary(p_1=0.2,p_0=0.2,n_1=100,r_1_f=25,r_1_e=33,
n_2=105,r_2=29,sim_num=100000)



Simulations: Expanded Simon's design: the three stage design, no sample size change

Description

Simulations: Expanded Simon's design: the three stage design, no sample size change

Usage

one_arm_rej_3_stg_binary(
  p_1,
  p_0,
  n_1,
  r_1,
  n_2,
  r_2_f,
  r_2_e = NA,
  n_3,
  r_3,
  sim_num
)

Arguments

p_1

The assumed response rate.

p_0

Response rate indicating low activity with insufficient clinical benefit.

n_1

Number of patients at first look.

r_1

If no more than r_1 responses are observed at the first look, then the trial would be stopped for futility.

n_2

Number of patients at second look.

r_2_f

If no more than responses are observed at the second look, then the trial would be stopped for futility.

r_2_e

The trial would be stopped for superiority if at least r_2_e responses are observed at the first look. If r_2_e is not used in the design, enter NA.

n_3

Number of patients at third look.

r_3

If at least r_2 responses are observed at the third look, then the null hypothesis will be rejected.

sim_num

Purpose of simulation: To verify type I error control by setting p_1=p_0, To verify the parameters n_1,r_1,n_2,r_2_f,r_2_e,n_3,r_3 are correctly chosen, such that the rejection rate matches that from the design table of the three-stage design.

Value

Average sample size is EN(p_1).

Rate of termination is PET(p_1)

References

R. Simon. Optimal Two-Stage Designs for Phase II Clinical Trials. Controlled Clinical Trials 10:1-10 (1989).

P. Gao & W. Zhang (15 Apr 2024): Adaptive sequential design for phase II single-arm oncology trials: an expansion of Simon’s design, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2341673. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2341673.

P. Gao, J.H. Ware, C. Mehta, (2008), Sample size re-estimation for adaptive sequential designs. Journal of Biopharmaceutical Statistics, 18: 1184–1196, 2008.

Examples


one_arm_rej_3_stg_binary(p_1=0.2,p_0=0.2,n_1=37,r_1=8,n_2=100,r_2_f=22,r_2_e=33,
n_3=105,r_3=29,sim_num=100000)



Simulations: two stage fixed Simon's design

Description

Simulations: two stage fixed Simon's design

Usage

one_arm_rej_simon_binary(p_1, p_0, n_1, r_1, n_2, r_2, sim_num)

Arguments

p_1

The assumed response rate.

p_0

Response rate indicating low activity with insufficient clinical benefit.

n_1

Number of patients at first look.

r_1

If no more than r_1 responses are observed at the first look, then the trial would be stopped for futility.

n_2

Number of patients at second look.

r_2

If no more than r_2 responses are observed at the second look, then the null hypothesis will be rejected.

sim_num

Purpose of simulation: To verify type I error control by setting p_1=p_0, To verify the parameters n_1,r_1,n_2,r_2 are correctly chosen, such that the trial has 1-beta power if the true response rate is p_1.

Value

Average sample size is EN(p_1).

Rate of termination is PET(p_1)

References

R. Simon. Optimal Two-Stage Designs for Phase II Clinical Trials. Controlled Clinical Trials 10:1-10 (1989).

P. Gao & W. Zhang (15 Apr 2024): Adaptive sequential design for phase II single-arm oncology trials: an expansion of Simon’s design, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2341673. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2341673.

P. Gao, J.H. Ware, C. Mehta, (2008), Sample size re-estimation for adaptive sequential designs. Journal of Biopharmaceutical Statistics, 18: 1184–1196, 2008.

Examples


one_arm_rej_simon_binary(p_1=0.4,p_0=0.2,n_1=37,r_1=9,n_2=53,r_2=16,sim_num=100000)



Two-stage design: Simon's design

Description

Two-stage design: Simon's design

Usage

simon_ph2_sz(alpha, beta, p_0, p_1)

Arguments

alpha

One-sided type I error.

beta

Type II error.

p_0

Response rate indicating low activity with insufficient clinical benefit.

p_1

Assumed response rate.

Value

r1: If no more than r1 responses are observed at the first look, then the trial would be stopped for futility.

n1: Number of patients at first look.

r_2: The null hypothesis will be rejected if at least r_2 responses are observed at the end of the trial.

n_2: Number of patients at second look. n_2 is also the total sample size.

EN(p_0) is the expected sample size under the null hypothesis.

PET(p_0) is the probability of early termination under the null hypothesis.

PET_p_1 is the probability of early termination under p=p_1.

power_p_1 is the power under p=p_1.

Type I error is the probability of rejecting the null hypothesis under p<=p_0.

The minimax design has the smallest n_2 among all possible choices of (n1,r1,n_2,r_2).

The optimal design has the smallest EN(p_0) among all possible choices of (n1,r1,n_2,r_2).

The average design is an augmentation of the original Simon’s design (Gao, Zhang. 2024). The n1 for the average design is the average of n1's from the minimax and the optimal designs.

References

R. Simon. Optimal Two-Stage Designs for Phase II Clinical Trials. Controlled Clinical Trials 10:1-10 (1989).

P. Gao & W. Zhang (15 Apr 2024): Adaptive sequential design for phase II single-arm oncology trials: an expansion of Simon’s design, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2341673. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2341673.

Examples

simon_ph2_sz(alpha=0.025,beta=0.1,p_0=0.2,p_1=0.33)

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.