Package {DACT}


Version: 1.0.4
Title: Design and Analysis for Clinical Trials
Author: Ping Gao [aut, cre]
Maintainer: Ping Gao <support@innovatiostat.com>
Description: The applications and evaluation of the operating characteristics of many statistical methodologies require the use of sophisticated software or extensive simulations. 'DACT' is designed to serve a wide range of innovative statistical designs and analyses. The primary objective of the 'DACT' software is to promote the understanding and application of cutting-edge statistical solutions in clinical trials. For this reason, the software is free for non-commercial scientific research, including but not limited to academic researchers and research/teaching institutions. Computing codes are available upon request. For more details see P. Gao (2024) <doi:10.1080/10543406.2024.2341673>. Gao, P., Zhang, W. (2024) <doi:10.1080/10543406.2024.2358796>. P. Gao & Y. Li (2024) <doi:10.1080/10543406.2023.2233590>. P. Gao, Y. Li (2024) <doi:10.1080/10543406.2024.2342518>. Gao, P., L. Liu, and C. Mehta. (2013) <doi:10.1002/sim.5847>.
Depends: clinfun, mvtnorm, doParallel
License: MIT + file LICENSE
Encoding: UTF-8
Imports: foreach, dplyr, jsonlite, MASS, survival, parallel, stats, utils
Config/roxygen2/version: 8.0.0
URL: https://github.com/innovatiostat/rcode
BugReports: https://github.com/innovatiostat/rcode/issues
NeedsCompilation: no
Packaged: 2026-11-06 13:02:07 UTC; chengboqin
Repository: CRAN
Date/Publication: 2026-11-07 23:20:08 UTC

Single arm phase 2 oncology trial: Three-stage design

Description

Single arm phase 2 oncology trial: Three-stage design

Usage

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

Arguments

alpha

Type I error for the one-sided test

beta

Type II error rate, i.e. 1 - power

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

Sets the minimal difference between n_3 and n_2 for the design; min(n_3 - n_2)

Value

A named list with the following components:

Simon's design: p=p_1

A matrix with one row per design (minimax, optimal and average) for Simon's design using p_1 as the target response rate, with columns r1, n1, r_2, n_2, EN(p0) (expected sample size under p_0), PET(p0) (probability of early termination under p_0), t1_err, PET_p (PET under p_1), PET_p_low (PET under p_low), power_p (power under p_1) and power_p_low (power under p_low)

Simon's design: p=p_low

The corresponding matrix for Simon's design using p_low as the target response rate

Expanded 3 stage design

A matrix with one row per design (minimax, optimal and average) and columns r_1, r_2, r_3, n_1, n_2, n_3 (n_3 is also the total sample size), r_2_e (the trial is stopped for superiority if at least r_2_e responses are observed at the second look), t1_err, PET_p1, PET_plow, power (power under p_1), EN_p0 (expected sample size under p_0) and PW_p_low (power under p_low)

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.4, p_1 = 0.55,
  d_23_cut = 0)


Multiple comparisons Group sequential design: Binary distribution, Sample size calculation, O'Brien-Fleming boundary

Description

Multiple comparisons Group sequential design: Binary distribution, Sample size calculation, O'Brien-Fleming boundary

Usage

MSD_Sample_size_OF_boundary_binary_diff(
  p_t,
  p_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  dist1,
  dist2
)

Arguments

p_t

Vector of event rates of the test arms, one entry per dose or endpoint; 0 < p_t < 1, and the function returns NA if the largest effect size is below 1e-4

p_c

Event rate of the common control arm; 0 < p_c < 1

margin

Non-inferiority margin; must be >= 0, set to 0 for a superiority trial and > 0 for a non-inferiority trial

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

Distribution indicator for the first stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

dist2

Distribution indicator for the second stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

Value

A named list with the following components:

test arm sample size

Sample size required for a test arm; equal to rand_ratio times the control arm sample size

control arm sample size

Sample size required for the common control arm

sample size for each dose in a two arm study with same critical boudary

Vector with one test arm sample size per dose or endpoint, as if a separate two arm trial were conducted for that dose with the same critical boundary

sample size for control arm corresponding to each dose in a two arm study with same critical boudary

Vector with the matching control arm sample size for each dose or endpoint

Type I error control

Boundary output of the closed testing procedure: a list with one element per comparison level (the M-level boundary first, down to the 1-level boundary), each element a list containing the vectors 'critical bounadry', 'alpha spent at each interim analysis', 'cumulative alpha' and 'nominal p-value' for the analyses

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

MSD_Sample_size_OF_boundary_binary_diff( p_t = 0.4, p_c = 0.3, margin = 0.1, direction = 1,
  s = c(1/3, 2/3, 1), alpha = 0.025, beta = 0.1, rand_ratio = 1, dist1 = 1, dist2 = 1)


Multiple comparisons Group sequential design: Negative binomial distribution, Sample size calculation, O'Brien-Fleming boundary

Description

Multiple comparisons Group sequential design: Negative binomial distribution, Sample size calculation, O'Brien-Fleming boundary

Usage

MSD_Sample_size_OF_boundary_neg_binomial(
  r_t,
  r_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  nu_t,
  kappa,
  dist1,
  dist2
)

Arguments

r_t

Vector of mean rates of the test arms, one entry per dose or endpoint; the function returns NA if the largest log rate ratio is below 1e-4 or if any adjusted test arm rate r_t +/- margin is below 1e-4

r_c

Mean rate of the common control arm

margin

Non-inferiority margin; must be >= 0, set to 0 for a superiority trial and > 0 for a non-inferiority trial

direction

Test direction: 1 = larger r is better, otherwise smaller r is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

dist1

Distribution indicator for the first stage: 1 = the sample size calculation is for multiple dose vs. a common control; 2 = otherwise. It has no effect here: the boundary calculation always uses dist1 = 2

dist2

Distribution indicator for the second stage: 1 = the sample size calculation is for multiple dose vs. a common control; 2 = otherwise. It has no effect here: the information time calculation always uses dist2 = 1

Value

A named list with the following components:

test arm sample size

Sample size required for a test arm; equal to rand_ratio times the control arm sample size

control arm sample size

Sample size required for the common control arm

sample size for each dose in a two arm study with same critical boudary

Vector with one test arm sample size per dose or endpoint, as if a separate two arm trial were conducted for that dose with the same critical boundary

sample size for control arm corresponding to each dose in a two arm study with same critical boudary

Vector with the matching control arm sample size for each dose or endpoint

Type I error control

Boundary output of the closed testing procedure: a list with one element per comparison level (the M-level boundary first, down to the 1-level boundary), each element a list containing the vectors 'critical bounadry', 'alpha spent at each interim analysis', 'cumulative alpha' and 'nominal p-value' for the analyses

Reference

Reference for the negative binomial sample size formula

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

MSD_Sample_size_OF_boundary_neg_binomial(r_t = c(1.1, 1.1, 1.1), r_c = 1.1, margin = 0.1,
direction = 0, s = c(1/3, 2/3, 1),
alpha = 0.025, beta = 0.1, rand_ratio = 1, nu_t = 6, kappa = 1, dist1 = 1, dist2 = 1)


Multiple comparisons Group sequential design: Normal distribution, Sample size calculation, O'Brien-Fleming boundary

Description

Multiple comparisons Group sequential design: Normal distribution, Sample size calculation, O'Brien-Fleming boundary

Usage

MSD_Sample_size_OF_boundary_normal(
  mu_t,
  mu_c,
  std_t,
  std_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  dist1,
  dist2
)

Arguments

mu_t

Vector of means of the test arms, one entry per dose or endpoint; the function returns NA if the largest effect size is below 1e-4

mu_c

Mean of the common control arm

std_t

Common standard deviation of the test arms; must be > 0

std_c

Standard deviation of the control arm; must be > 0

margin

Non-inferiority margin; must be >= 0, set to 0 for a superiority trial and > 0 for a non-inferiority trial

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

Distribution indicator for the first stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

dist2

Distribution indicator for the second stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

Value

A named list with the following components:

test arm sample size

Sample size required for a test arm; equal to rand_ratio times the control arm sample size

control arm sample size

Sample size required for the common control arm

sample size for each dose in a two arm study with same critical boudary

Vector with one test arm sample size per dose or endpoint, as if a separate two arm trial were conducted for that dose with the same critical boundary

sample size for control arm corresponding to each dose in a two arm study with same critical boudary

Vector with the matching control arm sample size for each dose or endpoint

Type I error control

Boundary output of the closed testing procedure: a list with one element per comparison level (the M-level boundary first, down to the 1-level boundary), each element a list containing the vectors 'critical bounadry', 'alpha spent at each interim analysis', 'cumulative alpha' and 'nominal p-value' for the analyses

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

MSD_Sample_size_OF_boundary_normal( mu_t = 2.6, mu_c = 0.6, std_t = 9.43, std_c = 9.86,
  margin = 0.1, direction = 1, s = c(1/3, 2/3, 1), alpha = 0.025, beta = 0.1, rand_ratio = 1,
  dist1 = 1, dist2 = 1)


Multiple comparisons Group sequential design: Poisson distribution, Sample size calculation, O'Brien-Fleming boundary

Description

Multiple comparisons Group sequential design: Poisson distribution, Sample size calculation, O'Brien-Fleming boundary

Usage

MSD_Sample_size_OF_boundary_poisson(
  lambda_t,
  lambda_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  dist1,
  dist2
)

Arguments

lambda_t

Vector of means (rates) of the test arms, one entry per dose or endpoint; the function returns NA if the largest effect size is below 1e-4

lambda_c

Mean (rate) of the common control arm

margin

Non-inferiority margin; must be >= 0, set to 0 for a superiority trial and > 0 for a non-inferiority trial

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

Distribution indicator for the first stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

dist2

Distribution indicator for the second stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

Value

A named list with the following components:

test arm sample size

Sample size required for a test arm; equal to rand_ratio times the control arm sample size

control arm sample size

Sample size required for the common control arm

sample size for each dose in a two arm study with same critical boudary

Vector with one test arm sample size per dose or endpoint, as if a separate two arm trial were conducted for that dose with the same critical boundary

sample size for control arm corresponding to each dose in a two arm study with same critical boudary

Vector with the matching control arm sample size for each dose or endpoint

Type I error control

Boundary output of the closed testing procedure: a list with one element per comparison level (the M-level boundary first, down to the 1-level boundary), each element a list containing the vectors 'critical bounadry', 'alpha spent at each interim analysis', 'cumulative alpha' and 'nominal p-value' for the analyses

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

MSD_Sample_size_OF_boundary_poisson( lambda_t = 1.1, lambda_c = 1.0, margin = 0.1,
  direction = 1, s = c(1/3, 2/3, 1), alpha = 0.025, beta = 0.1, rand_ratio = 1, dist1 = 1,
  dist2 = 1)


Multiple comparisons Group sequential design: Survival analysis, Sample size calculation, O'Brien-Fleming boundary

Description

Multiple comparisons Group sequential design: Survival analysis, Sample size calculation, O'Brien-Fleming boundary

Usage

MSD_Sample_size_OF_boundary_survival_Schoenfeld(
  HR,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  dist1,
  dist2
)

Arguments

HR

Vector of hazard ratios of the test arms vs. the control arm, one entry per dose or endpoint; the function returns NA if the largest effect size is below 1e-4

margin

Non-inferiority margin on the hazard ratio scale; must be > 0, with margin = 1 for a superiority trial and margin != 1 for a non-inferiority trial (0 < margin < 1 if larger HR is better, margin > 1 if smaller HR is better)

direction

Test direction: 1 = larger HR is better, otherwise smaller HR is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

Distribution indicator for the first stage; dist1 = 2 is the conservative choice

dist2

Distribution indicator for the second stage; dist2 = 1 is the conservative choice

Value

A named list with the following components:

Combined number of events between a dose and control

Total number of events, test arm and control arm combined, required for one dose vs. control comparison

total number of events from all doses and control

Total number of events required for the whole trial, i.e. all doses and the common control arm

combined number of events in each dose and control in a two arm study with same critical boudary

Vector with the combined number of events for each dose and its control, as if a separate two arm trial were conducted for that dose with the same critical boundary

Type I error control

Boundary output of the closed testing procedure: a list with one element per comparison level (the M-level boundary first, down to the 1-level boundary), each element a list containing the vectors 'critical bounadry', 'alpha spent at each interim analysis', 'cumulative alpha' and 'nominal p-value' for the analyses

reference

Reference for the Schoenfeld event number formula

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

MSD_Sample_size_OF_boundary_survival_Schoenfeld( HR = 0.7, margin = 0.1, direction = 1,
  s = c(1/3, 2/3, 1), alpha = 0.025, beta = 0.1, rand_ratio = 1, dist1 = 1, dist2 = 1)


Multiple comparisons Group sequential design: Binary distribution, Sample size calculation, Alpha-spending boundary

Description

Multiple comparisons Group sequential design: Binary distribution, Sample size calculation, Alpha-spending boundary

Usage

MSD_Sample_size_alsp_boundary_binary_diff(
  p_t,
  p_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  dist1,
  dist2
)

Arguments

p_t

Vector of event rates of the test arms, one entry per dose or endpoint; 0 < p_t < 1, and the function returns NA if the largest effect size is below 1e-4

p_c

Event rate of the common control arm; 0 < p_c < 1

margin

Non-inferiority margin; must be >= 0, set to 0 for a superiority trial and > 0 for a non-inferiority trial

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Vector of alpha-spending values for the one-sided test, one per analysis and of the same length as s, summing to the overall one-sided type I error; each value must satisfy 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

Distribution indicator for the first stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

dist2

Distribution indicator for the second stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

Value

A named list with the following components:

test arm sample size

Sample size required for a test arm; equal to rand_ratio times the control arm sample size

control arm sample size

Sample size required for the common control arm

sample size for each dose in a two arm study with same critical boudary

Vector with one test arm sample size per dose or endpoint, as if a separate two arm trial were conducted for that dose with the same critical boundary

sample size for control arm corresponding to each dose in a two arm study with same critical boudary

Vector with the matching control arm sample size for each dose or endpoint

Type I error control

Boundary output of the closed testing procedure: a list with one element per comparison level (the M-level boundary first, down to the 1-level boundary), each element a list containing the vectors 'critical bounadry', 'alpha spent at each interim analysis', 'cumulative alpha' and 'nominal p-value' for the analyses

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

MSD_Sample_size_alsp_boundary_binary_diff( p_t = c(0.2,0.3,0.4), p_c = 0.5, margin = 0.1,
  direction = 2, s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023), beta = 0.1, rand_ratio = 1,
  dist1 = 1, dist2 = 1)


Multiple comparisons Group sequential design: Negative binomial distribution, Sample size calculation, Alpha-spending boundary

Description

Multiple comparisons Group sequential design: Negative binomial distribution, Sample size calculation, Alpha-spending boundary

Usage

MSD_Sample_size_alsp_boundary_neg_binomial(
  r_t,
  r_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  nu_t,
  kappa,
  dist1,
  dist2
)

Arguments

r_t

Vector of mean rates of the test arms, one entry per dose or endpoint; the function returns NA if the largest log rate ratio is below 1e-4 or if any adjusted test arm rate r_t +/- margin is below 1e-4

r_c

Mean rate of the common control arm

margin

Non-inferiority margin; must be >= 0, set to 0 for a superiority trial and > 0 for a non-inferiority trial

direction

Test direction: 1 = larger r is better, otherwise smaller r is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Vector of alpha-spending values for the one-sided test, one per analysis and of the same length as s, summing to the overall one-sided type I error; each value must satisfy 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

dist1

Distribution indicator for the first stage; it has no effect here, because the boundary calculation always uses dist1 = 2

dist2

Distribution indicator for the second stage; it has no effect here, because the information time calculation always uses dist2 = 1

Value

A named list with the following components:

test arm sample size

Sample size required for a test arm; equal to rand_ratio times the control arm sample size

control arm sample size

Sample size required for the common control arm

sample size for each dose in a two arm study with same critical boudary

Vector with one test arm sample size per dose or endpoint, as if a separate two arm trial were conducted for that dose with the same critical boundary

sample size for control arm corresponding to each dose in a two arm study with same critical boudary

Vector with the matching control arm sample size for each dose or endpoint

Type I error control

Boundary output of the closed testing procedure: a list with one element per comparison level (the M-level boundary first, down to the 1-level boundary), each element a list containing the vectors 'critical bounadry', 'alpha spent at each interim analysis', 'cumulative alpha' and 'nominal p-value' for the analyses

Reference

Reference for the negative binomial sample size formula

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

MSD_Sample_size_alsp_boundary_neg_binomial( r_t = c(0.2,0.3,0.4), r_c = 0.6, margin = 0.1,
  direction = 2, s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023), beta = 0.1, rand_ratio = 1,
  nu_t = 1, kappa = 1, dist1 = 1, dist2 = 1)


Multiple comparisons Group sequential design: Normal distribution, Sample size calculation, Alpha-spending boundary

Description

Multiple comparisons Group sequential design: Normal distribution, Sample size calculation, Alpha-spending boundary

Usage

MSD_Sample_size_alsp_boundary_normal(
  mu_t,
  mu_c,
  std_t,
  std_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  dist1,
  dist2
)

Arguments

mu_t

Vector of means of the test arms, one entry per dose or endpoint; the function returns NA if the largest effect size is below 1e-4

mu_c

Mean of the common control arm

std_t

Common standard deviation of the test arms; must be > 0

std_c

Standard deviation of the control arm; must be > 0

margin

Non-inferiority margin; must be >= 0, set to 0 for a superiority trial and > 0 for a non-inferiority trial

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Vector of alpha-spending values for the one-sided test, one per analysis and of the same length as s, summing to the overall one-sided type I error; each value must satisfy 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

Distribution indicator for the first stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

dist2

Distribution indicator for the second stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

Value

A named list with the following components:

test arm sample size

Sample size required for a test arm; equal to rand_ratio times the control arm sample size

control arm sample size

Sample size required for the common control arm

sample size for each dose in a two arm study with same critical boudary

Vector with one test arm sample size per dose or endpoint, as if a separate two arm trial were conducted for that dose with the same critical boundary

sample size for control arm corresponding to each dose in a two arm study with same critical boudary

Vector with the matching control arm sample size for each dose or endpoint

Type I error control

Boundary output of the closed testing procedure: a list with one element per comparison level (the M-level boundary first, down to the 1-level boundary), each element a list containing the vectors 'critical bounadry', 'alpha spent at each interim analysis', 'cumulative alpha' and 'nominal p-value' for the analyses

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

MSD_Sample_size_alsp_boundary_normal( mu_t = c(0.2,0.3,0.4), mu_c = 0, std_t = 1, std_c = 1,
  margin = 0, direction = 1, s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023), beta = 0.1,
  rand_ratio = 1, dist1 = 1, dist2 = 1)


Multiple comparisons Group sequential design: Poisson distribution, Sample size calculation, Alpha-spending boundary

Description

Multiple comparisons Group sequential design: Poisson distribution, Sample size calculation, Alpha-spending boundary

Usage

MSD_Sample_size_alsp_boundary_poisson(
  lambda_t,
  lambda_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  dist1,
  dist2
)

Arguments

lambda_t

Vector of means (rates) of the test arms, one entry per dose or endpoint; the function returns NA if the largest effect size is below 1e-4

lambda_c

Mean (rate) of the common control arm

margin

Non-inferiority margin; must be >= 0, set to 0 for a superiority trial and > 0 for a non-inferiority trial

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Vector of alpha-spending values for the one-sided test, one per analysis and of the same length as s, summing to the overall one-sided type I error; each value must satisfy 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

Distribution indicator for the first stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

dist2

Distribution indicator for the second stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

Value

A named list with the following components:

test arm sample size

Sample size required for a test arm; equal to rand_ratio times the control arm sample size

control arm sample size

Sample size required for the common control arm

sample size for each dose in a two arm study with same critical boudary

Vector with one test arm sample size per dose or endpoint, as if a separate two arm trial were conducted for that dose with the same critical boundary

sample size for control arm corresponding to each dose in a two arm study with same critical boudary

Vector with the matching control arm sample size for each dose or endpoint

Type I error control

Boundary output of the closed testing procedure: a list with one element per comparison level (the M-level boundary first, down to the 1-level boundary), each element a list containing the vectors 'critical bounadry', 'alpha spent at each interim analysis', 'cumulative alpha' and 'nominal p-value' for the analyses

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

MSD_Sample_size_alsp_boundary_poisson( lambda_t = c(0.2,0.3,0.4), lambda_c = 0.5, margin = 0.11,
  direction = 2, s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023), beta = 0.1, rand_ratio = 1,
  dist1 = 1, dist2 = 1)


Multiple comparisons Group sequential design: Survival analysis, Sample size calculation, Alpha-spending boundary

Description

Multiple comparisons Group sequential design: Survival analysis, Sample size calculation, Alpha-spending boundary

Usage

MSD_Sample_size_alsp_boundary_survival_Schoenfeld(
  HR,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  dist1,
  dist2
)

Arguments

HR

Vector of hazard ratios of the test arms vs. the control arm, one entry per dose or endpoint; the function returns NA if the largest effect size is below 1e-4

margin

Non-inferiority margin on the hazard ratio scale; must be > 0, with margin = 1 for a superiority trial and margin != 1 for a non-inferiority trial (0 < margin < 1 if larger HR is better, margin > 1 if smaller HR is better)

direction

Test direction: 1 = larger HR is better, otherwise smaller HR is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Vector of alpha-spending values for the one-sided test, one per analysis and of the same length as s, summing to the overall one-sided type I error; each value must satisfy 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

Distribution indicator for the first stage; dist1 = 2 is the conservative choice

dist2

Distribution indicator for the second stage; dist2 = 1 is the conservative choice

Value

A named list with the following components:

Combined number of events between a dose and control

Total number of events, test arm and control arm combined, required for one dose vs. control comparison

total number of events from all doses and control

Total number of events required for the whole trial, i.e. all doses and the common control arm

combined number of events in each dose and control in a two arm study with same critical boudary

Vector with the combined number of events for each dose and its control, as if a separate two arm trial were conducted for that dose with the same critical boundary

Type I error control

Boundary output of the closed testing procedure: a list with one element per comparison level (the M-level boundary first, down to the 1-level boundary), each element a list containing the vectors 'critical bounadry', 'alpha spent at each interim analysis', 'cumulative alpha' and 'nominal p-value' for the analyses

reference

Reference for the Schoenfeld event number formula

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

MSD_Sample_size_alsp_boundary_survival_Schoenfeld( HR = c(0.2,0.3,0.4), margin = 1.1,
  direction = 2, s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023), beta = 0.1, rand_ratio = 1,
  dist1 = 1, dist2 = 1)


Multiple comparisons Group sequential design: Binary distribution, Power calculation, O'Brien-Fleming boundary

Description

Multiple comparisons Group sequential design: Binary distribution, Power calculation, O'Brien-Fleming boundary

Usage

MSD_power_OF_boundary_binary_diff(
  p_t,
  p_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio,
  dist1,
  dist2
)

Arguments

p_t

Vector of event rates of the test arms, one entry per dose or endpoint; 0 < p_t < 1

p_c

Event rate of the common control arm; 0 < p_c < 1

margin

Non-inferiority margin; must be >= 0, set to 0 for a superiority trial and > 0 for a non-inferiority trial

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

Distribution indicator for the first stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

dist2

Distribution indicator for the second stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

Value

A named list with the following components:

power

Power of the trial for the given control arm sample size

Type I error control

Boundary output of the closed testing procedure: a list with one element per comparison level (the M-level boundary first, down to the 1-level boundary), each element a list containing the vectors 'critical bounadry', 'alpha spent at each interim analysis', 'cumulative alpha' and 'nominal p-value' for the analyses

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

MSD_power_OF_boundary_binary_diff(p_t = 0.4, p_c = 0.3, margin = 0.1, direction = 0,
s = c(1/3, 2/3, 1), alpha = 0.025, sampsz_control = 100,
rand_ratio = 1, dist1 = 1, dist2 = 1)


Multiple comparisons Group sequential design: Negative binomial distribution, Power calculation, O'Brien-Fleming boundary

Description

Multiple comparisons Group sequential design: Negative binomial distribution, Power calculation, O'Brien-Fleming boundary

Usage

MSD_power_OF_boundary_neg_binomial(
  r_t,
  r_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio,
  nu_t,
  kappa,
  dist1,
  dist2
)

Arguments

r_t

Vector of mean rates of the test arms, one entry per dose or endpoint

r_c

Mean rate of the common control arm

margin

Non-inferiority margin; must be >= 0, set to 0 for a superiority trial and > 0 for a non-inferiority trial

direction

Test direction: 1 = larger r is better, otherwise smaller r is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

dist1

Distribution indicator for the first stage: 1 = the sample size calculation is for multiple dose vs. a common control; 2 = otherwise. It has no effect here: the boundary calculation always uses dist1 = 2

dist2

Distribution indicator for the second stage: 1 = the sample size calculation is for multiple dose vs. a common control; 2 = otherwise. It has no effect here: the information time calculation always uses dist2 = 1

Value

A named list with the following components:

power

Power of the trial for the given control arm sample size

Type I error control

Boundary output of the closed testing procedure: a list with one element per comparison level (the M-level boundary first, down to the 1-level boundary), each element a list containing the vectors 'critical bounadry', 'alpha spent at each interim analysis', 'cumulative alpha' and 'nominal p-value' for the analyses

Reference

Reference for the negative binomial sample size formula

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

MSD_power_OF_boundary_neg_binomial(r_t = c(1.1, 1.1, 1.1), r_c = 1.1, margin = 0.1,
direction = 0, s = c(1/3, 2/3, 1), alpha = 0.025, sampsz_control = 100, rand_ratio = 1,
nu_t = 6, kappa = 1, dist1 = 1, dist2 = 1)


Multiple comparisons Group sequential design: Normal distribution, Power calculation, O'Brien-Fleming boundary

Description

Multiple comparisons Group sequential design: Normal distribution, Power calculation, O'Brien-Fleming boundary

Usage

MSD_power_OF_boundary_normal(
  mu_t,
  mu_c,
  std_t,
  std_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio,
  dist1,
  dist2
)

Arguments

mu_t

Vector of means of the test arms, one entry per dose or endpoint

mu_c

Mean of the common control arm

std_t

Common standard deviation of the test arms; must be > 0

std_c

Standard deviation of the control arm; must be > 0

margin

Non-inferiority margin; must be >= 0, set to 0 for a superiority trial and > 0 for a non-inferiority trial

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

Distribution indicator for the first stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

dist2

Distribution indicator for the second stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

Value

A named list with the following components:

power

Power of the trial for the given control arm sample size

Type I error control

Boundary output of the closed testing procedure: a list with one element per comparison level (the M-level boundary first, down to the 1-level boundary), each element a list containing the vectors 'critical bounadry', 'alpha spent at each interim analysis', 'cumulative alpha' and 'nominal p-value' for the analyses

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

MSD_power_OF_boundary_normal(mu_t = 2.6, mu_c = 0.6, std_t = 9.43, std_c = 9.86, margin = 0.1,
direction = 0, s = c(1/3, 2/3, 1),
alpha = 0.025, sampsz_control = 100, rand_ratio = 1, dist1 = 1, dist2 = 1)


Multiple comparisons Group sequential design: Poisson distribution, Power calculation, O'Brien-Fleming boundary

Description

Multiple comparisons Group sequential design: Poisson distribution, Power calculation, O'Brien-Fleming boundary

Usage

MSD_power_OF_boundary_poisson(
  lambda_t,
  lambda_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio,
  dist1,
  dist2
)

Arguments

lambda_t

Vector of means (rates) of the test arms, one entry per dose or endpoint

lambda_c

Mean (rate) of the common control arm

margin

Non-inferiority margin; must be >= 0, set to 0 for a superiority trial and > 0 for a non-inferiority trial

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

Distribution indicator for the first stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

dist2

Distribution indicator for the second stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

Value

A named list with the following components:

power

Power of the trial for the given control arm sample size

Type I error control

Boundary output of the closed testing procedure: a list with one element per comparison level (the M-level boundary first, down to the 1-level boundary), each element a list containing the vectors 'critical bounadry', 'alpha spent at each interim analysis', 'cumulative alpha' and 'nominal p-value' for the analyses

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

MSD_power_OF_boundary_poisson(lambda_t = 1.1, lambda_c = 1.0, margin = 0.1, direction = 0,
s = c(1/3, 2/3, 1), alpha = 0.025, sampsz_control = 100, rand_ratio = 1, dist1 = 1, dist2 = 1)


Multiple comparisons Group sequential design: Survival analysis, Power calculation, O'Brien-Fleming boundary

Description

Multiple comparisons Group sequential design: Survival analysis, Power calculation, O'Brien-Fleming boundary

Usage

MSD_power_OF_boundary_survival_Schoenfeld(
  HR,
  margin,
  direction,
  s,
  alpha,
  events_tot,
  rand_ratio,
  dist1,
  dist2
)

Arguments

HR

Vector of hazard ratios of the test arms vs. the control arm, one entry per dose or endpoint

margin

Non-inferiority margin on the hazard ratio scale; must be > 0, with margin = 1 for a superiority trial and margin != 1 for a non-inferiority trial (0 < margin < 1 if larger HR is better, margin > 1 if smaller HR is better)

direction

Test direction: 1 = larger HR is better, otherwise smaller HR is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

events_tot

Total number of events for the trial, used in place of the control arm sample size

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

Distribution indicator for the first stage; dist1 = 2 is the conservative choice

dist2

Distribution indicator for the second stage; dist2 = 1 is the conservative choice

Value

A named list with the following components:

power

Power of the trial for the given total number of events

Type I error control

Boundary output of the closed testing procedure: a list with one element per comparison level (the M-level boundary first, down to the 1-level boundary), each element a list containing the vectors 'critical bounadry', 'alpha spent at each interim analysis', 'cumulative alpha' and 'nominal p-value' for the analyses

reference

Reference for the Schoenfeld event number formula

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

MSD_power_OF_boundary_survival_Schoenfeld(HR = 0.7, margin = 0.1, direction = 0,
s = c(1/3, 2/3, 1), alpha = 0.025, events_tot = 100,
rand_ratio = 1, dist1 = 1, dist2 = 1)


Multiple comparisons Group sequential design: Binary distribution, Power calculation, Alpha-spending boundary

Description

Multiple comparisons Group sequential design: Binary distribution, Power calculation, Alpha-spending boundary

Usage

MSD_power_alsp_boundary_binary_diff(
  p_t,
  p_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio,
  dist1,
  dist2
)

Arguments

p_t

Vector of event rates of the test arms, one entry per dose or endpoint; 0 < p_t < 1

p_c

Event rate of the common control arm; 0 < p_c < 1

margin

Non-inferiority margin; must be >= 0, set to 0 for a superiority trial and > 0 for a non-inferiority trial

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Vector of alpha-spending values for the one-sided test, one per analysis and of the same length as s, summing to the overall one-sided type I error; each value must satisfy 0 < alpha < 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

Distribution indicator for the first stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

dist2

Distribution indicator for the second stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

Value

A named list with the following components:

power

Power of the trial for the given control arm sample size

Type I error control

Boundary output of the closed testing procedure: a list with one element per comparison level (the M-level boundary first, down to the 1-level boundary), each element a list containing the vectors 'critical bounadry', 'alpha spent at each interim analysis', 'cumulative alpha' and 'nominal p-value' for the analyses

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

MSD_power_alsp_boundary_binary_diff(p_t = c(0.2,0.3,0.4), p_c = 0.5, margin = 0.1,
direction = 1, s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.048), sampsz_control = 68,
rand_ratio = 1, dist1 = 1, dist2 = 1)


Multiple comparisons Group sequential design: Negative binomial distribution, Power calculation, Alpha-spending boundary

Description

Multiple comparisons Group sequential design: Negative binomial distribution, Power calculation, Alpha-spending boundary

Usage

MSD_power_alsp_boundary_neg_binomial(
  r_t,
  r_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio,
  nu_t,
  kappa,
  dist
)

Arguments

r_t

Vector of mean rates of the test arms, one entry per dose or endpoint

r_c

Mean rate of the common control arm

margin

Non-inferiority margin; must be >= 0, set to 0 for a superiority trial and > 0 for a non-inferiority trial

direction

Test direction: 1 = larger r is better, otherwise smaller r is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Vector of alpha-spending values for the one-sided test, one per analysis and of the same length as s, summing to the overall one-sided type I error; each value must satisfy 0 < alpha < 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

dist

Distribution indicator kept for consistency with the sibling functions; it is not used here, because the function always sets dist1 = 2 for the boundary calculation and dist2 = 1 for the information time calculation

Value

A named list with the following components:

power

Power of the trial for the given control arm sample size

Type I error control

Boundary output of the closed testing procedure: a list with one element per comparison level (the M-level boundary first, down to the 1-level boundary), each element a list containing the vectors 'critical bounadry', 'alpha spent at each interim analysis', 'cumulative alpha' and 'nominal p-value' for the analyses

Reference

Reference for the negative binomial sample size formula

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

MSD_power_alsp_boundary_neg_binomial(r_t=c(0.2,0.3,0.4), r_c=0.6, margin=0.1, direction=1,
s=c(1/3,2/3,1), alpha = c(0.001,0.001,0.023), sampsz_control = 90, rand_ratio = 1,
nu_t = 1, kappa = 1, dist = 1)


Multiple comparisons Group sequential design: Normal distribution, Power calculation, Alpha-spending boundary

Description

Multiple comparisons Group sequential design: Normal distribution, Power calculation, Alpha-spending boundary

Usage

MSD_power_alsp_boundary_normal(
  mu_t,
  mu_c,
  std_t,
  std_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio,
  dist1,
  dist2
)

Arguments

mu_t

Vector of means of the test arms, one entry per dose or endpoint

mu_c

Mean of the common control arm

std_t

Common standard deviation of the test arms; must be > 0

std_c

Standard deviation of the control arm; must be > 0

margin

Non-inferiority margin; must be >= 0, set to 0 for a superiority trial and > 0 for a non-inferiority trial

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Vector of alpha-spending values for the one-sided test, one per analysis and of the same length as s, summing to the overall one-sided type I error; each value must satisfy 0 < alpha < 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

Distribution indicator for the first stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

dist2

Distribution indicator for the second stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

Value

A named list with the following components:

power

Power of the trial for the given control arm sample size

Type I error control

Boundary output of the closed testing procedure: a list with one element per comparison level (the M-level boundary first, down to the 1-level boundary), each element a list containing the vectors 'critical bounadry', 'alpha spent at each interim analysis', 'cumulative alpha' and 'nominal p-value' for the analyses

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

MSD_power_alsp_boundary_normal(mu_t = c(0.2,0.3,0.4), mu_c = 0, std_t = 1, std_c = 1,
margin = 0, direction = 1, s = c(1/3,2/3,1),
alpha = c(0.001,0.001,0.023), sampsz_control = 148, rand_ratio = 1, dist1 = 1, dist2 = 1)


Multiple comparisons Group sequential design: Poisson distribution, Power calculation, Alpha-spending boundary

Description

Multiple comparisons Group sequential design: Poisson distribution, Power calculation, Alpha-spending boundary

Usage

MSD_power_alsp_boundary_poisson(
  lambda_t,
  lambda_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio,
  dist1,
  dist2
)

Arguments

lambda_t

Vector of means (rates) of the test arms, one entry per dose or endpoint

lambda_c

Mean (rate) of the common control arm

margin

Non-inferiority margin; must be >= 0, set to 0 for a superiority trial and > 0 for a non-inferiority trial

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Vector of alpha-spending values for the one-sided test, one per analysis and of the same length as s, summing to the overall one-sided type I error; each value must satisfy 0 < alpha < 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

Distribution indicator for the first stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

dist2

Distribution indicator for the second stage: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions; 2 = otherwise

Value

A named list with the following components:

power

Power of the trial for the given control arm sample size

Type I error control

Boundary output of the closed testing procedure: a list with one element per comparison level (the M-level boundary first, down to the 1-level boundary), each element a list containing the vectors 'critical bounadry', 'alpha spent at each interim analysis', 'cumulative alpha' and 'nominal p-value' for the analyses

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

MSD_power_alsp_boundary_poisson(lambda_t = c(0.2,0.3,0.4), lambda_c = 0.5, margin = 0.1,
direction = 2, s = c(1/3,2/3,1),
alpha = c(0.001,0.001,0.023), sampsz_control = 67, rand_ratio = 1, dist1 = 1, dist2 = 1)


Multiple comparisons Group sequential design: Survival analysis, Power calculation, Alpha-spending boundary

Description

Multiple comparisons Group sequential design: Survival analysis, Power calculation, Alpha-spending boundary

Usage

MSD_power_alsp_boundary_survival_Schoenfeld(
  HR,
  margin,
  direction,
  s,
  alpha,
  events_tot,
  rand_ratio,
  dist1,
  dist2
)

Arguments

HR

Vector of hazard ratios of the test arms vs. the control arm, one entry per dose or endpoint

margin

Non-inferiority margin on the hazard ratio scale; must be > 0, with margin = 1 for a superiority trial and margin != 1 for a non-inferiority trial (0 < margin < 1 if larger HR is better, margin > 1 if smaller HR is better)

direction

Test direction: 1 = larger HR is better, otherwise smaller HR is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Vector of alpha-spending values for the one-sided test, one per analysis and of the same length as s, summing to the overall one-sided type I error; each value must satisfy 0 < alpha < 1

events_tot

Total number of events for the trial, used in place of the control arm sample size

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

Distribution indicator for the first stage; dist1 = 2 is the conservative choice

dist2

Distribution indicator for the second stage; dist2 = 1 is the conservative choice

Value

A named list with the following components:

power

Power of the trial for the given total number of events

Type I error control

Boundary output of the closed testing procedure: a list with one element per comparison level (the M-level boundary first, down to the 1-level boundary), each element a list containing the vectors 'critical bounadry', 'alpha spent at each interim analysis', 'cumulative alpha' and 'nominal p-value' for the analyses

reference

Reference for the Schoenfeld event number formula

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

MSD_power_alsp_boundary_survival_Schoenfeld(HR = c(0.2,0.3,0.4), margin = 1.1, direction = 2,
s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023),
events_tot = 17, rand_ratio = 1, dist1 = 1, dist2 = 1)


Group sequential designs / Adaptive sequential designs: Binary distribution, Superiority trial, Sample size calculation, O'Brien-Fleming boundary

Description

Group sequential designs / Adaptive sequential designs: Binary distribution, Superiority trial, Sample size calculation, O'Brien-Fleming boundary

Usage

Sample_size_OF_boundary_binary_diff(p_t, p_c, s, alpha_2, beta, rand_ratio)

Arguments

p_t

Response rate (probability of response) in the test arm; 0 < p_t < 1

p_c

Response rate (probability of response) in the control arm; 0 < p_c < 1

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Returns NA when the two arms have the same endpoint parameter.

Examples

Sample_size_OF_boundary_binary_diff(p_t = 0.4, p_c = 0.3, s = c(1/3, 2/3, 1),
alpha_2 = 0.05, beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Binary distribution, Non-inferiority trial, Sample size calculation, O'Brien-Fleming boundary

Description

Group sequential designs / Adaptive sequential designs: Binary distribution, Non-inferiority trial, Sample size calculation, O'Brien-Fleming boundary

Usage

Sample_size_OF_boundary_binary_diff_NI(
  p_t,
  p_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio
)

Arguments

p_t

Response rate (probability of response) in the test arm; 0 < p_t < 1

p_c

Response rate (probability of response) in the control arm; 0 < p_c < 1

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Returns NA when the implied effect size is not positive.

Examples

Sample_size_OF_boundary_binary_diff_NI( p_t = 0.4, p_c = 0.3, margin = 0.1, direction = 1,
  s = c(1/3, 2/3, 1), alpha = 0.025, beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Superiority trial, Sample size calculation, O'Brien-Fleming boundary

Description

Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Superiority trial, Sample size calculation, O'Brien-Fleming boundary

Usage

Sample_size_OF_boundary_neg_binomial(
  r_t,
  r_c,
  s,
  alpha_2,
  beta,
  rand_ratio,
  nu_t,
  kappa
)

Arguments

r_t

Event rate (mean number of events per unit of exposure time) in the test arm; must be > 0

r_c

Event rate (mean number of events per unit of exposure time) in the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time (follow-up time) of each subject, used to convert the number of events into a rate; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Reference

Reference for the sample size formula (Zhu and Lakkis, 2014)

Returns NA when the two arms have the same endpoint parameter.

Examples

Sample_size_OF_boundary_neg_binomial(r_t = 0.2, r_c = 0.4, s = c(1/3,2/3,1), alpha_2 = 0.05,
beta = 0.1, rand_ratio = 1, nu_t = 1, kappa = 1)


Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Non-inferiority trial, Sample size calculation, O'Brien-Fleming boundary

Description

Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Non-inferiority trial, Sample size calculation, O'Brien-Fleming boundary

Usage

Sample_size_OF_boundary_neg_binomial_NI(
  r_t,
  r_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  nu_t,
  kappa
)

Arguments

r_t

Event rate (mean number of events per unit of exposure time) in the test arm; must be > 0

r_c

Event rate (mean number of events per unit of exposure time) in the control arm; must be > 0

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger r_t is better, otherwise smaller r_t is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time (follow-up time) of each subject, used to convert the number of events into a rate; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Reference

Reference for the sample size formula (Zhu and Lakkis, 2014)

Returns NA when the implied effect size is not positive.

Examples

Sample_size_OF_boundary_neg_binomial_NI( r_t = 0.2, r_c = 0.4, margin = 0.1, direction = 2,
  s = c(1/3,2/3,1), alpha = 0.025, beta = 0.1, rand_ratio = 1, nu_t = 1, kappa = 1)


Group sequential designs / Adaptive sequential designs: Normal distribution, Superiority trial, Sample size calculation, O'Brien-Fleming boundary

Description

Group sequential designs / Adaptive sequential designs: Normal distribution, Superiority trial, Sample size calculation, O'Brien-Fleming boundary

Usage

Sample_size_OF_boundary_normal(
  mu_t,
  mu_c,
  std_t,
  std_c,
  s,
  alpha_2,
  beta,
  rand_ratio
)

Arguments

mu_t

Mean of the test arm

mu_c

Mean of the control arm

std_t

Standard deviation of the test arm; must be > 0

std_c

Standard deviation of the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Returns NA when the two arms have the same endpoint parameter.

Examples

Sample_size_OF_boundary_normal(mu_t = 2.6, mu_c = 0.6, std_t = 9.43, std_c = 9.86,
s = c(1/3, 2/3, 1), alpha_2 = 0.05, beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Normal distribution, Non-inferiority trial, Sample size calculation, O'Brien-Fleming boundary

Description

Group sequential designs / Adaptive sequential designs: Normal distribution, Non-inferiority trial, Sample size calculation, O'Brien-Fleming boundary

Usage

Sample_size_OF_boundary_normal_NI(
  mu_t,
  mu_c,
  std_t,
  std_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio
)

Arguments

mu_t

Mean of the test arm

mu_c

Mean of the control arm

std_t

Standard deviation of the test arm; must be > 0

std_c

Standard deviation of the control arm; must be > 0

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Returns NA when the implied effect size is not positive.

Examples

Sample_size_OF_boundary_normal_NI( mu_t = 2.6, mu_c = 0.6, std_t = 9.43, std_c = 9.86,
  margin = 0.1, direction = 1, s = c(1/3, 2/3, 1), alpha = 0.025, beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Poisson distribution, Superiority trial, Sample size calculation, O'Brien-Fleming boundary

Description

Group sequential designs / Adaptive sequential designs: Poisson distribution, Superiority trial, Sample size calculation, O'Brien-Fleming boundary

Usage

Sample_size_OF_boundary_poisson(
  lambda_t,
  lambda_c,
  s,
  alpha_2,
  beta,
  rand_ratio
)

Arguments

lambda_t

Event rate (mean number of events) in the test arm; must be > 0

lambda_c

Event rate (mean number of events) in the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Returns NA when the two arms have the same endpoint parameter.

Examples

Sample_size_OF_boundary_poisson(lambda_t = 1.1, lambda_c = 1.0, s = c(1/3, 2/3, 1),
alpha_2 = 0.05, beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Poisson distribution, Non-inferiority trial, Sample size calculation, O'Brien-Fleming boundary

Description

Group sequential designs / Adaptive sequential designs: Poisson distribution, Non-inferiority trial, Sample size calculation, O'Brien-Fleming boundary

Usage

Sample_size_OF_boundary_poisson_NI(
  lambda_t,
  lambda_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio
)

Arguments

lambda_t

Event rate (mean number of events) in the test arm; must be > 0

lambda_c

Event rate (mean number of events) in the control arm; must be > 0

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Returns NA when the implied effect size is not positive.

Examples

Sample_size_OF_boundary_poisson_NI( lambda_t = 1.1, lambda_c = 1.0, margin = 0.1, direction = 1,
  s = c(1/3, 2/3, 1), alpha = 0.025, beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Survival analysis, Superiority trial, Sample size calculation, O'Brien-Fleming boundary

Description

Group sequential designs / Adaptive sequential designs: Survival analysis, Superiority trial, Sample size calculation, O'Brien-Fleming boundary

Usage

Sample_size_OF_boundary_survival_Schoenfeld(HR, s, alpha_2, beta, rand_ratio)

Arguments

HR

Hazard ratio of the test arm vs. the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

total number of events

Total number of events required across both the test arm and the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

reference

Reference for the sample size formula (Schoenfeld, 1983)

Returns NA when the two arms have the same endpoint parameter.

Examples

Sample_size_OF_boundary_survival_Schoenfeld(HR = 0.7, s = c(1/3, 2/3, 1),
alpha_2 = 0.05, beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Survival analysis, Non-inferiority trial, Sample size calculation, O'Brien-Fleming boundary

Description

Group sequential designs / Adaptive sequential designs: Survival analysis, Non-inferiority trial, Sample size calculation, O'Brien-Fleming boundary

Usage

Sample_size_OF_boundary_survival_Schoenfeld_NI(
  HR,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio
)

Arguments

HR

Hazard ratio of the test arm vs. the control arm; must be > 0

margin

Non-inferiority margin on the hazard ratio scale; must be > 0, with HR > margin required when direction is 1 and HR < margin required otherwise

direction

Test direction: 1 = larger HR is better, otherwise smaller HR is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

total number of events

Total number of events required across both the test arm and the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

reference

Reference for the sample size formula (Schoenfeld, 1983)

Returns NA when HR is not on the required side of margin for the specified direction.

Examples

Sample_size_OF_boundary_survival_Schoenfeld_NI( HR = 0.7, margin = 0.1, direction = 1,
  s = c(1/3, 2/3, 1), alpha = 0.025, beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Binary distribution, Superiority trial, Sample size calculation, Alpha-spending boundary

Description

Group sequential designs / Adaptive sequential designs: Binary distribution, Superiority trial, Sample size calculation, Alpha-spending boundary

Usage

Sample_size_alsp_boundary_binary_diff(p_t, p_c, s, alpha_2, beta, rand_ratio)

Arguments

p_t

Response rate (probability of response) in the test arm; 0 < p_t < 1

p_c

Response rate (probability of response) in the control arm; 0 < p_c < 1

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test, entered for the alpha-spending boundary as the vector of the two-sided alpha-spending values alpha_1, ..., alpha_K at the K analyses; each element must be > 0 and the elements must sum to alpha_2

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Returns NA when the two arms have the same endpoint parameter.

Examples

Sample_size_alsp_boundary_binary_diff(p_t = 0.2, p_c = 0.6, s = c(1/3,2/3,1),
alpha_2 = c(0.001,0.001,0.048), beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Binary distribution, Non-inferiority trial, Sample size calculation, Alpha-spending boundary

Description

Group sequential designs / Adaptive sequential designs: Binary distribution, Non-inferiority trial, Sample size calculation, Alpha-spending boundary

Usage

Sample_size_alsp_boundary_binary_diff_NI(
  p_t,
  p_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio
)

Arguments

p_t

Response rate (probability of response) in the test arm; 0 < p_t < 1

p_c

Response rate (probability of response) in the control arm; 0 < p_c < 1

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test, entered for the alpha-spending boundary as the vector of the one-sided alpha-spending values alpha_1, ..., alpha_K at the K analyses; each element must be > 0 and the elements must sum to alpha

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Returns NA when the implied effect size is not positive.

Examples

Sample_size_alsp_boundary_binary_diff_NI( p_t = 0.2, p_c = 0.6, margin = 0.15, direction = 2,
  s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023), beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Superiority trial, Sample size calculation, Alpha-spending boundary

Description

Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Superiority trial, Sample size calculation, Alpha-spending boundary

Usage

Sample_size_alsp_boundary_neg_binomial(
  r_t,
  r_c,
  s,
  alpha_2,
  beta,
  rand_ratio,
  nu_t,
  kappa
)

Arguments

r_t

Event rate (mean number of events per unit of exposure time) in the test arm; must be > 0

r_c

Event rate (mean number of events per unit of exposure time) in the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test, entered for the alpha-spending boundary as the vector of the two-sided alpha-spending values alpha_1, ..., alpha_K at the K analyses; each element must be > 0 and the elements must sum to alpha_2

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time (follow-up time) of each subject, used to convert the number of events into a rate; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Reference

Reference for the sample size formula (Zhu and Lakkis, 2014)

Returns NA when the two arms have the same endpoint parameter.

Examples

Sample_size_alsp_boundary_neg_binomial(r_t = 0.2, r_c = 0.4, s = c(1/3,2/3,1),
alpha_2 = c(0.001,0.001,0.048), beta = 0.1, rand_ratio = 1, nu_t = 1, kappa = 1)


Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Non-inferiority trial, Sample size calculation, Alpha-spending boundary

Description

Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Non-inferiority trial, Sample size calculation, Alpha-spending boundary

Usage

Sample_size_alsp_boundary_neg_binomial_NI(
  r_t,
  r_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  nu_t,
  kappa
)

Arguments

r_t

Event rate (mean number of events per unit of exposure time) in the test arm; must be > 0

r_c

Event rate (mean number of events per unit of exposure time) in the control arm; must be > 0

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger r_t is better, otherwise smaller r_t is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test, entered for the alpha-spending boundary as the vector of the one-sided alpha-spending values alpha_1, ..., alpha_K at the K analyses; each element must be > 0 and the elements must sum to alpha

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time (follow-up time) of each subject, used to convert the number of events into a rate; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Reference

Reference for the sample size formula (Zhu and Lakkis, 2014)

Returns NA when the implied effect size is not positive.

Examples

Sample_size_alsp_boundary_neg_binomial_NI( r_t = 0.2, r_c = 0.4, margin = 0.1, direction = 2,
  s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023), beta = 0.1, rand_ratio = 1, nu_t = 1,
  kappa = 1)


Group sequential designs / Adaptive sequential designs: Normal distribution, Superiority trial, Sample size calculation, Alpha-spending boundary

Description

Group sequential designs / Adaptive sequential designs: Normal distribution, Superiority trial, Sample size calculation, Alpha-spending boundary

Usage

Sample_size_alsp_boundary_normal(
  mu_t,
  mu_c,
  std_t,
  std_c,
  s,
  alpha_2,
  beta,
  rand_ratio
)

Arguments

mu_t

Mean of the test arm

mu_c

Mean of the control arm

std_t

Standard deviation of the test arm; must be > 0

std_c

Standard deviation of the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test, entered for the alpha-spending boundary as the vector of the two-sided alpha-spending values alpha_1, ..., alpha_K at the K analyses; each element must be > 0 and the elements must sum to alpha_2

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Returns NA when the two arms have the same endpoint parameter.

Examples

Sample_size_alsp_boundary_normal(mu_t = 0.2, mu_c = 0, std_t = 1, std_c = 1, s = c(1/3,2/3,1),
alpha_2 = c(0.001,0.001,0.048), beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Normal distribution, Non-inferiority trial, Sample size calculation, Alpha-spending boundary

Description

Group sequential designs / Adaptive sequential designs: Normal distribution, Non-inferiority trial, Sample size calculation, Alpha-spending boundary

Usage

Sample_size_alsp_boundary_normal_NI(
  mu_t,
  mu_c,
  std_t,
  std_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio
)

Arguments

mu_t

Mean of the test arm

mu_c

Mean of the control arm

std_t

Standard deviation of the test arm; must be > 0

std_c

Standard deviation of the control arm; must be > 0

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test, entered for the alpha-spending boundary as the vector of the one-sided alpha-spending values alpha_1, ..., alpha_K at the K analyses; each element must be > 0 and the elements must sum to alpha

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Returns NA when the implied effect size is not positive.

Examples

Sample_size_alsp_boundary_normal_NI( mu_t = 0.2, mu_c = 0, std_t = 1, std_c = 1, margin = 0.15,
  direction = 1, s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023), beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Poisson distribution, Superiority trial, Sample size calculation, Alpha-spending boundary

Description

Group sequential designs / Adaptive sequential designs: Poisson distribution, Superiority trial, Sample size calculation, Alpha-spending boundary

Usage

Sample_size_alsp_boundary_poisson(
  lambda_t,
  lambda_c,
  s,
  alpha_2,
  beta,
  rand_ratio
)

Arguments

lambda_t

Event rate (mean number of events) in the test arm; must be > 0

lambda_c

Event rate (mean number of events) in the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test, entered for the alpha-spending boundary as the vector of the two-sided alpha-spending values alpha_1, ..., alpha_K at the K analyses; each element must be > 0 and the elements must sum to alpha_2

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Returns NA when the two arms have the same endpoint parameter.

Examples

Sample_size_alsp_boundary_poisson(lambda_t = 0.2, lambda_c = 0.4, s = c(1/3,2/3,1),
alpha_2 = c(0.001,0.001,0.048), beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Poisson distribution, Non-inferiority trial, Sample size calculation, Alpha-spending boundary

Description

Group sequential designs / Adaptive sequential designs: Poisson distribution, Non-inferiority trial, Sample size calculation, Alpha-spending boundary

Usage

Sample_size_alsp_boundary_poisson_NI(
  lambda_t,
  lambda_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio
)

Arguments

lambda_t

Event rate (mean number of events) in the test arm; must be > 0

lambda_c

Event rate (mean number of events) in the control arm; must be > 0

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test, entered for the alpha-spending boundary as the vector of the one-sided alpha-spending values alpha_1, ..., alpha_K at the K analyses; each element must be > 0 and the elements must sum to alpha

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Returns NA when the implied effect size is not positive.

Examples

Sample_size_alsp_boundary_poisson_NI( lambda_t = 0.2, lambda_c = 0.4, margin = 0.15,
  direction = 2, s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023), beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Survival analysis, Superiority trial, Sample size calculation, Alpha-spending boundary

Description

Group sequential designs / Adaptive sequential designs: Survival analysis, Superiority trial, Sample size calculation, Alpha-spending boundary

Usage

Sample_size_alsp_boundary_survival_Schoenfeld(HR, s, alpha_2, beta, rand_ratio)

Arguments

HR

Hazard ratio of the test arm vs. the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test, entered for the alpha-spending boundary as the vector of the two-sided alpha-spending values alpha_1, ..., alpha_K at the K analyses; each element must be > 0 and the elements must sum to alpha_2

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

total number of events

Total number of events required across both the test arm and the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

reference

Reference for the sample size formula (Schoenfeld, 1983)

Returns NA when the two arms have the same endpoint parameter.

Examples

Sample_size_alsp_boundary_survival_Schoenfeld(HR = 0.59, s = c(0.596,1),
alpha_2 = c(0.001,0.0249), beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Survival analysis, Non-inferiority trial, Sample size calculation, Alpha-spending boundary

Description

Group sequential designs / Adaptive sequential designs: Survival analysis, Non-inferiority trial, Sample size calculation, Alpha-spending boundary

Usage

Sample_size_alsp_boundary_survival_Schoenfeld_NI(
  HR,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio
)

Arguments

HR

Hazard ratio of the test arm vs. the control arm; must be > 0

margin

Non-inferiority margin on the hazard ratio scale; must be > 0, with HR > margin required when direction is 1 and HR < margin required otherwise

direction

Test direction: 1 = larger HR is better, otherwise smaller HR is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test, entered for the alpha-spending boundary as the vector of the one-sided alpha-spending values alpha_1, ..., alpha_K at the K analyses; each element must be > 0 and the elements must sum to alpha

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

total number of events

Total number of events required across both the test arm and the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

reference

Reference for the sample size formula (Schoenfeld, 1983)

Returns NA when HR is not on the required side of margin for the specified direction.

Examples

Sample_size_alsp_boundary_survival_Schoenfeld_NI( HR = 0.59, margin = 1, direction = 2,
  s = c(0.596,1), alpha = c(0.005,0.02), beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Binary distribution, Superiority trial, Sample size calculation, Pocock boundary

Description

Group sequential designs / Adaptive sequential designs: Binary distribution, Superiority trial, Sample size calculation, Pocock boundary

Usage

Sample_size_pocock_boundary_binary_diff(p_t, p_c, s, alpha_2, beta, rand_ratio)

Arguments

p_t

Response rate (probability of response) in the test arm; 0 < p_t < 1

p_c

Response rate (probability of response) in the control arm; 0 < p_c < 1

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Returns NA when the two arms have the same endpoint parameter.

Examples

Sample_size_pocock_boundary_binary_diff(p_t = 0.4, p_c = 0.3, s = c(1/3, 2/3, 1),
alpha_2 = 0.05, beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Binary distribution, Non-inferiority trial, Sample size calculation, Pocock boundary

Description

Group sequential designs / Adaptive sequential designs: Binary distribution, Non-inferiority trial, Sample size calculation, Pocock boundary

Usage

Sample_size_pocock_boundary_binary_diff_NI(
  p_t,
  p_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio
)

Arguments

p_t

Response rate (probability of response) in the test arm; 0 < p_t < 1

p_c

Response rate (probability of response) in the control arm; 0 < p_c < 1

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Returns NA when the implied effect size is not positive.

Examples

Sample_size_pocock_boundary_binary_diff_NI( p_t = 0.4, p_c = 0.3, margin = 0.1, direction = 1,
  s = c(1/3, 2/3, 1), alpha = 0.025, beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Superiority trial, Sample size calculation, Pocock boundary

Description

Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Superiority trial, Sample size calculation, Pocock boundary

Usage

Sample_size_pocock_boundary_neg_binomial(
  r_t,
  r_c,
  s,
  alpha_2,
  beta,
  rand_ratio,
  nu_t,
  kappa
)

Arguments

r_t

Event rate (mean number of events per unit of exposure time) in the test arm; must be > 0

r_c

Event rate (mean number of events per unit of exposure time) in the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time (follow-up time) of each subject, used to convert the number of events into a rate; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Reference

Reference for the sample size formula (Zhu and Lakkis, 2014)

Returns NA when the two arms have the same endpoint parameter.

Examples

Sample_size_pocock_boundary_neg_binomial(r_t = 0.2, r_c = 0.4, s = c(1/3,2/3,1),
alpha_2 = 0.05, beta = 0.1, rand_ratio = 1, nu_t = 1, kappa = 1)


Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Non-inferiority trial, Sample size calculation, Pocock boundary

Description

Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Non-inferiority trial, Sample size calculation, Pocock boundary

Usage

Sample_size_pocock_boundary_neg_binomial_NI(
  r_t,
  r_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  nu_t,
  kappa
)

Arguments

r_t

Event rate (mean number of events per unit of exposure time) in the test arm; must be > 0

r_c

Event rate (mean number of events per unit of exposure time) in the control arm; must be > 0

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger r_t is better, otherwise smaller r_t is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time (follow-up time) of each subject, used to convert the number of events into a rate; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Reference

Reference for the sample size formula (Zhu and Lakkis, 2014)

Returns NA when the implied effect size is not positive.

Examples

Sample_size_pocock_boundary_neg_binomial_NI( r_t = 0.2, r_c = 0.4, margin = 0.1, direction = 2,
  s = c(1/3,2/3,1), alpha = 0.025, beta = 0.1, rand_ratio = 1, nu_t = 1, kappa = 1)


Group sequential designs / Adaptive sequential designs: Normal distribution, Superiority trial, Sample size calculation, Pocock boundary

Description

Group sequential designs / Adaptive sequential designs: Normal distribution, Superiority trial, Sample size calculation, Pocock boundary

Usage

Sample_size_pocock_boundary_normal(
  mu_t,
  mu_c,
  std_t,
  std_c,
  s,
  alpha_2,
  beta,
  rand_ratio
)

Arguments

mu_t

Mean of the test arm

mu_c

Mean of the control arm

std_t

Standard deviation of the test arm; must be > 0

std_c

Standard deviation of the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Returns NA when the two arms have the same endpoint parameter.

Examples

Sample_size_pocock_boundary_normal(mu_t = 2.6, mu_c = 0.6, std_t = 9.43, std_c = 9.86,
s = c(1/3, 2/3, 1), alpha_2 = 0.05, beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Normal distribution, Non-inferiority trial, Sample size calculation, Pocock boundary

Description

Group sequential designs / Adaptive sequential designs: Normal distribution, Non-inferiority trial, Sample size calculation, Pocock boundary

Usage

Sample_size_pocock_boundary_normal_NI(
  mu_t,
  mu_c,
  std_t,
  std_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio
)

Arguments

mu_t

Mean of the test arm

mu_c

Mean of the control arm

std_t

Standard deviation of the test arm; must be > 0

std_c

Standard deviation of the control arm; must be > 0

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Returns NA when the implied effect size is not positive.

Examples

Sample_size_pocock_boundary_normal_NI( mu_t = 2.6, mu_c = 0.6, std_t = 9.43, std_c = 9.86,
  margin = 0.1, direction = 1, s = c(1/3, 2/3, 1), alpha = 0.025, beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Poisson distribution, Superiority trial, Sample size calculation, Pocock boundary

Description

Group sequential designs / Adaptive sequential designs: Poisson distribution, Superiority trial, Sample size calculation, Pocock boundary

Usage

Sample_size_pocock_boundary_poisson(
  lambda_t,
  lambda_c,
  s,
  alpha_2,
  beta,
  rand_ratio
)

Arguments

lambda_t

Event rate (mean number of events) in the test arm; must be > 0

lambda_c

Event rate (mean number of events) in the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Returns NA when the two arms have the same endpoint parameter.

Examples

Sample_size_pocock_boundary_poisson(lambda_t = 0.2, lambda_c = 0.4, s = c(1/3,2/3,1),
alpha_2 = 0.05, beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Poisson distribution, Non-inferiority trial, Sample size calculation, Pocock boundary

Description

Group sequential designs / Adaptive sequential designs: Poisson distribution, Non-inferiority trial, Sample size calculation, Pocock boundary

Usage

Sample_size_pocock_boundary_poisson_NI(
  lambda_t,
  lambda_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio
)

Arguments

lambda_t

Event rate (mean number of events) in the test arm; must be > 0

lambda_c

Event rate (mean number of events) in the control arm; must be > 0

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Returns NA when the implied effect size is not positive.

Examples

Sample_size_pocock_boundary_poisson_NI( lambda_t = 1.1, lambda_c = 1.0, margin = 0.1,
  direction = 1, s = c(1/3, 2/3, 1), alpha = 0.025, beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Survival analysis, Superiority trial, Sample size calculation, Pocock boundary

Description

Group sequential designs / Adaptive sequential designs: Survival analysis, Superiority trial, Sample size calculation, Pocock boundary

Usage

Sample_size_pocock_boundary_survival_Schoenfeld(
  HR,
  s,
  alpha_2,
  beta,
  rand_ratio
)

Arguments

HR

Hazard ratio of the test arm vs. the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

total number of events

Total number of events required across both the test arm and the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

reference

Reference for the sample size formula (Schoenfeld, 1983)

Returns NA when the two arms have the same endpoint parameter.

Examples

Sample_size_pocock_boundary_survival_Schoenfeld(HR = 0.7, s = c(1/3, 2/3, 1),
alpha_2 = 0.05, beta = 0.1, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Survival analysis, Non-inferiority trial, Sample size calculation, Pocock boundary

Description

Group sequential designs / Adaptive sequential designs: Survival analysis, Non-inferiority trial, Sample size calculation, Pocock boundary

Usage

Sample_size_pocock_boundary_survival_Schoenfeld_NI(
  HR,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio
)

Arguments

HR

Hazard ratio of the test arm vs. the control arm; must be > 0

margin

Non-inferiority margin on the hazard ratio scale; must be > 0, with HR > margin required when direction is 1 and HR < margin required otherwise

direction

Test direction: 1 = larger HR is better, otherwise smaller HR is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

total number of events

Total number of events required across both the test arm and the control arm

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

reference

Reference for the sample size formula (Schoenfeld, 1983)

Returns NA when HR is not on the required side of margin for the specified direction.

Examples

Sample_size_pocock_boundary_survival_Schoenfeld_NI( HR = 0.7, margin = 0.1, direction = 1,
  s = c(1/3, 2/3, 1), alpha = 0.025, beta = 0.1, rand_ratio = 1)


Phase 2/3 seamless combination Group sequential design: Simulations, Binary distribution, Optimizing adaptive sequential design

Description

Phase 2/3 seamless combination Group sequential design: Simulations, Binary distribution, Optimizing adaptive sequential design

Usage

Two_stage_asd_simu_OC_binary(
  groups,
  p_c,
  direction,
  s1,
  s2,
  alpha_2,
  alpha_2_alps_s1,
  alpha_2_alps_s2,
  theta_cut,
  samsz_1,
  samsz_2,
  N_max_1,
  N_max_2,
  beta,
  sim_num
)

Arguments

groups

Matrix of assumed event rates for the test arms under study: one row per candidate test-arm scenario and one column per dose, so that the number of doses is the number of columns; each event rate must be > 0 and < 1

p_c

Event rate of the control arm; must be > 0 and < 1

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s1

Vector of information fractions of the first interim analysis schedule; the last element must be 1

s2

Vector of information fractions of the second interim analysis schedule; the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

alpha_2_alps_s1

Vector of two-sided alpha to be spent at each analysis of the alpha-spending schedule s1; each element must be > 0 and the elements must sum to alpha_2

alpha_2_alps_s2

Vector of two-sided alpha to be spent at each analysis of the alpha-spending schedule s2; each element must be > 0 and the elements must sum to alpha_2

theta_cut

Lack-of-efficacy threshold: an effect size below which the test drug is not considered to provide clinically meaningful efficacy

samsz_1

Planned sample size of the control arm for the first sample size scenario

samsz_2

Planned sample size of the control arm for the second sample size scenario

N_max_1

Maximum sample size (control arm) allowed after sample size re-estimation for the first maximum sample size scenario

N_max_2

Maximum sample size (control arm) allowed after sample size re-estimation for the second maximum sample size scenario

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; 0 < beta < 1

sim_num

Number of simulation replicates

Value

A named list with the following components:

O'Brien-Fleming boundaries, interim analysis schedule=s1

List holding the group sequential design and the operating characteristics simulated under the schedule s1 with O'Brien-Fleming boundaries

O'Brien-Fleming boundaries, interim analysis schedule=s2

List holding the group sequential design and the operating characteristics simulated under the schedule s2 with O'Brien-Fleming boundaries

Alpha-spending boundaries, interim analysis schedule=s1

List holding the group sequential design and the operating characteristics simulated under the schedule s1 with alpha-spending boundaries

Alpha-spending boundaries, interim analysis schedule=s2

List holding the group sequential design and the operating characteristics simulated under the schedule s2 with alpha-spending boundaries

Each of these four lists has the components "Group sequential design" (data frame with the columns "Looks", "Information fractions" and the critical boundaries, plus "Alpha-spending" and "Alpha-spending boundaries" for the alpha-spending schedules) and the "Simulation results: Information fractions ..., Sample size ..., N_max ..." operating characteristics of the corresponding adaptive design, one data frame per combination of interim analysis schedule, planned sample size and maximum sample size, with one row per assumed event-rate scenario.

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


set.seed(1)
Two_stage_asd_simu_OC_binary(
groups = rbind(c(0.3,0.4,0.5),c(0.1,0.2,0.3),c(0.1,0.2,0.3),c(0.1,0.2,0.3)), p_c = 0.2,
direction = 1, s1 = c(1/3,2/3,1), s2 = c(0.5,1), alpha_2 = 0.05,
alpha_2_alps_s1 = c(0.001,0.001,0.048), alpha_2_alps_s2 = c(0.001,0.049), theta_cut = 0.01,
samsz_1 = 100, samsz_2 = 150, N_max_1 = 1000, N_max_2 = 1500, beta = 0.1, sim_num = 2)



Phase 2/3 seamless combination Group sequential design: Simulations, Negative binomial distribution, Optimizing adaptive sequential design

Description

Phase 2/3 seamless combination Group sequential design: Simulations, Negative binomial distribution, Optimizing adaptive sequential design

Usage

Two_stage_asd_simu_OC_neg_binomial(
  groups,
  r_c,
  kappa,
  direction,
  s1,
  s2,
  alpha_2,
  alpha_2_alps_s1,
  alpha_2_alps_s2,
  theta_cut,
  samsz_1,
  samsz_2,
  N_max_1,
  N_max_2,
  beta,
  sim_num
)

Arguments

groups

Matrix of assumed mean event rates for the test arms under study: one row per candidate test-arm scenario and one column per dose, so that the number of doses is the number of columns; each mean event rate must be > 0

r_c

Mean event rate of the control arm; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

direction

Test direction: 1 = larger r is better, otherwise smaller r is better

s1

Vector of information fractions of the first interim analysis schedule; the last element must be 1

s2

Vector of information fractions of the second interim analysis schedule; the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

alpha_2_alps_s1

Vector of two-sided alpha to be spent at each analysis of the alpha-spending schedule s1; each element must be > 0 and the elements must sum to alpha_2

alpha_2_alps_s2

Vector of two-sided alpha to be spent at each analysis of the alpha-spending schedule s2; each element must be > 0 and the elements must sum to alpha_2

theta_cut

Lack-of-efficacy threshold: an effect size below which the test drug is not considered to provide clinically meaningful efficacy

samsz_1

Planned sample size of the control arm for the first sample size scenario

samsz_2

Planned sample size of the control arm for the second sample size scenario

N_max_1

Maximum sample size (control arm) allowed after sample size re-estimation for the first maximum sample size scenario

N_max_2

Maximum sample size (control arm) allowed after sample size re-estimation for the second maximum sample size scenario

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; 0 < beta < 1

sim_num

Number of simulation replicates

Value

A named list with the following components:

O'Brien-Fleming boundaries, interim analysis schedule=s1

List holding the group sequential design and the operating characteristics simulated under the schedule s1 with O'Brien-Fleming boundaries

O'Brien-Fleming boundaries, interim analysis schedule=s2

List holding the group sequential design and the operating characteristics simulated under the schedule s2 with O'Brien-Fleming boundaries

Alpha-spending boundaries, interim analysis schedule=s1

List holding the group sequential design and the operating characteristics simulated under the schedule s1 with alpha-spending boundaries

Alpha-spending boundaries, interim analysis schedule=s2

List holding the group sequential design and the operating characteristics simulated under the schedule s2 with alpha-spending boundaries

Each of these four lists has the components "Group sequential design" (data frame with the columns "Looks", "Information fractions" and the critical boundaries, plus "Alpha-spending" and "Alpha-spending boundaries" for the alpha-spending schedules) and the "Simulation results: Information fractions ..., Sample size ..., N_max ..." operating characteristics of the corresponding adaptive design, one data frame per combination of interim analysis schedule, planned sample size and maximum sample size, with one row per assumed mean event-rate scenario.

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


set.seed(1)
Two_stage_asd_simu_OC_neg_binomial(
groups = rbind(c(0.3,0.4,0.5),c(0.2,0.2,0.5),c(0.2,0.2,0.3),c(0.2,0.3,0.4)), r_c = 0.2,
kappa = 1, direction = 1, s1 = c(1/3,2/3,1), s2 = c(0.5,1), alpha_2 = 0.05,
alpha_2_alps_s1 = c(0.001,0.001,0.048), alpha_2_alps_s2 = c(0.001,0.049), theta_cut = 0.01,
samsz_1 = 100, samsz_2 = 150, N_max_1 = 1000, N_max_2 = 1500, beta = 0.1, sim_num = 2)



Phase 2/3 seamless combination Group sequential design: Simulations, Normal distribution, Optimizing adaptive sequential design

Description

Phase 2/3 seamless combination Group sequential design: Simulations, Normal distribution, Optimizing adaptive sequential design

Usage

Two_stage_asd_simu_OC_normal(
  groups,
  mu_c,
  sigma_t,
  sigma_c,
  direction,
  s1,
  s2,
  alpha_2,
  alpha_2_alps_s1,
  alpha_2_alps_s2,
  theta_cut,
  samsz_1,
  samsz_2,
  N_max_1,
  N_max_2,
  beta,
  sim_num
)

Arguments

groups

Matrix of assumed effect sizes for the test arms under study: one row per candidate test-arm scenario and one column per dose, so that the number of doses is the number of columns

mu_c

Mean of the control arm

sigma_t

Standard deviation of the test arms

sigma_c

Standard deviation of the control arm

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s1

Vector of information fractions of the first interim analysis schedule; the last element must be 1

s2

Vector of information fractions of the second interim analysis schedule; the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

alpha_2_alps_s1

Vector of two-sided alpha to be spent at each analysis of the alpha-spending schedule s1; each element must be > 0 and the elements must sum to alpha_2

alpha_2_alps_s2

Vector of two-sided alpha to be spent at each analysis of the alpha-spending schedule s2; each element must be > 0 and the elements must sum to alpha_2

theta_cut

Lack-of-efficacy threshold: an effect size below which the test drug is not considered to provide clinically meaningful efficacy

samsz_1

Planned sample size of the control arm for the first sample size scenario

samsz_2

Planned sample size of the control arm for the second sample size scenario

N_max_1

Maximum sample size (control arm) allowed after sample size re-estimation for the first maximum sample size scenario

N_max_2

Maximum sample size (control arm) allowed after sample size re-estimation for the second maximum sample size scenario

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; 0 < beta < 1

sim_num

Number of simulation replicates

Value

A named list of four elements, one per boundary type and interim analysis schedule, with the following components:

O'Brien-Fleming boundaries, interim analysis schedule=s1

List holding the group sequential design and the operating characteristics simulated under the schedule s1 with O'Brien-Fleming boundaries

O'Brien-Fleming boundaries, interim analysis schedule=s2

List holding the group sequential design and the operating characteristics simulated under the schedule s2 with O'Brien-Fleming boundaries

Alpha-spending boundaries, interim analysis schedule=s1

List holding the group sequential design and the operating characteristics simulated under the schedule s1 with alpha-spending boundaries

Alpha-spending boundaries, interim analysis schedule=s2

List holding the group sequential design and the operating characteristics simulated under the schedule s2 with alpha-spending boundaries

Each of these four lists has the components "Group sequential design" (data frame with the columns "Looks", "Information fractions" and the critical boundaries, plus "Alpha-spending" and "Alpha-spending boundaries" for the alpha-spending schedules) and "Simulation results: Information fractions ..., Sample size ..., N_max ..." (the operating characteristics of the corresponding adaptive design).

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


set.seed(1)
Two_stage_asd_simu_OC_normal(groups = rbind(c(0.2, 0.3, 0.4), c(0.3, 0.4, 0.5)), mu_c = 0,
sigma_t = 1, sigma_c = 1, direction = 1, s1 = c(1/3,2/3,1), s2 = c(0.5,1), alpha_2 = 0.05,
alpha_2_alps_s1 = c(0.001,0.001,0.048), alpha_2_alps_s2 = c(0.001,0.049), theta_cut = 0.01,
samsz_1 = 100, samsz_2 = 150, N_max_1 = 1000, N_max_2 = 1500, beta = 0.1, sim_num = 2)



Phase 2/3 seamless combination Group sequential design: Simulations, Poisson distribution, Optimizing adaptive sequential design

Description

Phase 2/3 seamless combination Group sequential design: Simulations, Poisson distribution, Optimizing adaptive sequential design

Usage

Two_stage_asd_simu_OC_poisson(
  groups,
  lambda_c,
  direction,
  s1,
  s2,
  alpha_2,
  alpha_2_alps_s1,
  alpha_2_alps_s2,
  theta_cut,
  samsz_1,
  samsz_2,
  N_max_1,
  N_max_2,
  beta,
  sim_num
)

Arguments

groups

Matrix of assumed means for the test arms under study: one row per candidate test-arm scenario and one column per dose, so that the number of doses is the number of columns; each mean must be > 0

lambda_c

Mean of the control arm; must be > 0

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s1

Vector of information fractions of the first interim analysis schedule; the last element must be 1

s2

Vector of information fractions of the second interim analysis schedule; the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

alpha_2_alps_s1

Vector of two-sided alpha to be spent at each analysis of the alpha-spending schedule s1; each element must be > 0 and the elements must sum to alpha_2

alpha_2_alps_s2

Vector of two-sided alpha to be spent at each analysis of the alpha-spending schedule s2; each element must be > 0 and the elements must sum to alpha_2

theta_cut

Lack-of-efficacy threshold: an effect size below which the test drug is not considered to provide clinically meaningful efficacy

samsz_1

Planned sample size of the control arm for the first sample size scenario

samsz_2

Planned sample size of the control arm for the second sample size scenario

N_max_1

Maximum sample size (control arm) allowed after sample size re-estimation for the first maximum sample size scenario

N_max_2

Maximum sample size (control arm) allowed after sample size re-estimation for the second maximum sample size scenario

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; 0 < beta < 1

sim_num

Number of simulation replicates

Value

A named list with the following components:

O'Brien-Fleming boundaries, interim analysis schedule=s1

List holding the group sequential design and the operating characteristics simulated under the schedule s1 with O'Brien-Fleming boundaries

O'Brien-Fleming boundaries, interim analysis schedule=s2

List holding the group sequential design and the operating characteristics simulated under the schedule s2 with O'Brien-Fleming boundaries

Alpha-spending boundaries, interim analysis schedule=s1

List holding the group sequential design and the operating characteristics simulated under the schedule s1 with alpha-spending boundaries

Alpha-spending boundaries, interim analysis schedule=s2

List holding the group sequential design and the operating characteristics simulated under the schedule s2 with alpha-spending boundaries

Each of these four lists has the components "Group sequential design" (data frame with the columns "Looks", "Information fractions" and the critical boundaries, plus "Alpha-spending" and "Alpha-spending boundaries" for the alpha-spending schedules) and the "Simulation results: Information fractions ..., Sample size ..., N_max ..." operating characteristics of the corresponding adaptive design, one data frame per combination of interim analysis schedule, planned sample size and maximum sample size, with one row per assumed mean scenario.

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


set.seed(1)
Two_stage_asd_simu_OC_poisson(
groups = rbind(c(0.3,0.4,0.5),c(0.2,0.2,0.5),c(0.2,0.2,0.3),c(0.2,0.3,0.4)), lambda_c = 0.2,
direction = 1, s1 = c(1/3,2/3,1), s2 = c(0.5,1), alpha_2 = 0.05,
alpha_2_alps_s1 = c(0.001,0.001,0.048), alpha_2_alps_s2 = c(0.001,0.049), theta_cut = 0.01,
samsz_1 = 100, samsz_2 = 150, N_max_1 = 1000, N_max_2 = 1500, beta = 0.1, sim_num = 2)



Phase 2/3 seamless combination Group sequential design: Simulations, Survival analysis, Optimizing adaptive sequential design

Description

Phase 2/3 seamless combination Group sequential design: Simulations, Survival analysis, Optimizing adaptive sequential design

Usage

Two_stage_asd_simu_OC_survival(
  groups,
  s1,
  s2,
  alpha_2,
  alpha_2_alps_s1,
  alpha_2_alps_s2,
  surv_rate,
  evt_num_1,
  evt_num_2,
  evt_max_1,
  evt_max_2,
  HR_cut,
  beta,
  sim_num
)

Arguments

groups

Matrix of assumed hazard ratios for the test arms under study: one row per candidate test-arm scenario and one column per dose, so that the number of doses is the number of columns; each hazard ratio is relative to the control arm, must be > 0, with HR < 1 indicating a beneficial effect and HR = 1 the null hypothesis

s1

Vector of information fractions of the first interim analysis schedule; the last element must be 1

s2

Vector of information fractions of the second interim analysis schedule; the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

alpha_2_alps_s1

Vector of two-sided alpha to be spent at each analysis of the alpha-spending schedule s1; each element must be > 0 and the elements must sum to alpha_2

alpha_2_alps_s2

Vector of two-sided alpha to be spent at each analysis of the alpha-spending schedule s2; each element must be > 0 and the elements must sum to alpha_2

surv_rate

Survival rate at the end of follow-up, used to translate the number of events into a sample size

evt_num_1

Planned number of events between a test arm and the control arm for the first event number scenario

evt_num_2

Planned number of events between a test arm and the control arm for the second event number scenario

evt_max_1

Maximum number of events between a test arm and the control arm allowed after sample size re-estimation for the first maximum event number scenario

evt_max_2

Maximum number of events between a test arm and the control arm allowed after sample size re-estimation for the second maximum event number scenario

HR_cut

Hazard-ratio cut-off for lack of efficacy at the interim analysis: the test drug is not considered to provide clinically meaningful efficacy when the observed hazard ratio is greater than HR_cut

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; 0 < beta < 1

sim_num

Number of simulation replicates

Value

A named list with the following components:

O'Brien-Fleming boundaries, interim analysis schedule=s1

List holding the group sequential design and the operating characteristics simulated under the schedule s1 with O'Brien-Fleming boundaries

O'Brien-Fleming boundaries, interim analysis schedule=s2

List holding the group sequential design and the operating characteristics simulated under the schedule s2 with O'Brien-Fleming boundaries

Alpha-spending boundaries, interim analysis schedule=s1

List holding the group sequential design and the operating characteristics simulated under the schedule s1 with alpha-spending boundaries

Alpha-spending boundaries, interim analysis schedule=s2

List holding the group sequential design and the operating characteristics simulated under the schedule s2 with alpha-spending boundaries

Each of these four lists has the components "Group sequential design" (data frame with the columns "Looks", "Information fractions" and the critical boundaries, plus "Alpha-spending" and "Alpha-spending boundaries" for the alpha-spending schedules) and the "Simulation results: Information fractions ..., Sample size ..., evt_max ..." operating characteristics of the corresponding adaptive design, one data frame per combination of interim analysis schedule, planned event number and maximum number of events, with one row per assumed hazard-ratio scenario.

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


set.seed(1)
Two_stage_asd_simu_OC_survival(
groups = rbind(c(0.8, 0.83, 0.85), c(0.78, 0.8, 0.82), c(0.75, 0.78, 0.8)), s1 = c(1/3,2/3,1),
s2 = c(0.5,1), alpha_2 = 0.05, alpha_2_alps_s1 = c(0.001,0.001,0.048),
alpha_2_alps_s2 = c(0.01,0.04), surv_rate = 0.5, evt_num_1 = 200, evt_num_2 = 300,
evt_max_1 = 2000, evt_max_2 = 3000, HR_cut = 0.95, beta = 0.1, sim_num = 2)



Group sequential designs / Adaptive sequential designs: Final analysis, With one sample size change

Description

Group sequential designs / Adaptive sequential designs: Final analysis, With one sample size change

Usage

asd_ci_est_back(
  s,
  c_bry,
  snew,
  c_bry_new,
  theta_hat_inter,
  theta_hat_inter_sd,
  inter_vt,
  theta_hat_last_ad,
  theta_hat_last_ad_sd,
  last_vt_ad,
  alpha_2
)

Arguments

s

Vector of information fractions of the original design, e.g. c(0.3, 0.7, 1); the last element must be 1

c_bry

Vector of critical boundaries of the original design, one per analysis

snew

Vector of information fractions after the sample size is changed; the last element must be 1

c_bry_new

Vector of critical boundaries after the sample size is changed, one per remaining analysis

theta_hat_inter

Treatment effect estimate observed at the interim analysis at which the sample size was re-estimated

theta_hat_inter_sd

Standard error of theta_hat_inter

inter_vt

Index (1-based) of the interim analysis at which the sample size was re-estimated

theta_hat_last_ad

Treatment effect estimate observed at the last analysis after the sample size change

theta_hat_last_ad_sd

Standard error of theta_hat_last_ad

last_vt_ad

Index (1-based) of the last analysis after the sample size change

alpha_2

Type I error for the two-sided test; the confidence interval has coverage 1 - alpha_2

Value

A named list with the following components:

p-value

Two-sided p-value for the null hypothesis of no treatment effect, obtained by inverting the adaptive sequential boundary under the Brownian motion approximation

confidence interval

Numeric vector of length 3 giving the lower confidence limit, the point estimate and the upper confidence limit of the two-sided (1 - alpha_2) confidence interval

References

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

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_back(s = c(0.3,0.7,1), c_bry = c(4.347011, 2.845787, 2.380956), snew = c(0.5,1),
c_bry_new = c(3.310743, 2.781890), theta_hat_inter = 1.2, theta_hat_inter_sd = 1, inter_vt = 1,
theta_hat_last_ad = 2.2, theta_hat_last_ad_sd = 1, last_vt_ad = 2, alpha_2 = 0.05)


Single arm phase 2 oncology trial: Final analysis: two stage design, with sample size change

Description

Single arm phase 2 oncology trial: 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 in the original design

r_1_e

Superiority-stopping threshold at the first look: the trial would be stopped for superiority if at least r_1_e responses are observed at the first look. Enter NA when the design uses no efficacy boundary at the first look; the function then bases the final boundary on r_2 alone

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, used as the final sample size

x_1

Number of responses at the first look

x_new

Number of responses at the final visit

alpha

Type I error for the one-sided test

Details

The results with continuity correction are not necessarily different from those without continuity correction. The need for continuity correction can be determined through simulations on the type I error (see Gao and Zhang, 2004).

Value

A named list whose components depend on whether a first-look efficacy boundary was supplied. When r_1_e is NA the list contains p_value and Confidence interval; otherwise it contains four components, reported without and with continuity correction:

p_value

P-value of the test of the null hypothesis that the response rate equals p_0 at the final analysis; returned when r_1_e is NA

Confidence interval

Numeric vector of length 3 holding the lower limit, the point estimate and the upper limit of the two-sided (1 - 2*alpha) confidence interval for the response rate; returned when r_1_e is NA

p_no_correction

P-value at the final analysis computed without continuity correction

p_correction

The same p-value computed with the 0.5 continuity correction

CI_withot_correction

Numeric vector of length 3 holding the lower limit, the point estimate and the upper limit of the two-sided (1 - 2*alpha) confidence interval for the response rate, computed without continuity correction

CI_with_correction

The same confidence interval computed with the 0.5 continuity correction

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)


Single arm phase 2 oncology trial: Final analysis: three stage design, with sample size change

Description

Single arm phase 2 oncology trial: 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

Superiority-stopping threshold at the second look: 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; the function then bases the final boundary on r_3 alone

r_2

If no more than r_2 responses are observed at the second look, then the trial would be stopped for futility; kept for consistency with the design of the trial and not used by this function, which conditions on the observed responses at the second 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_new

New sample size after the interim analysis, taken at the second look and used as the final sample size

x_2

Number of responses at the second look

x_new

Number of responses at the final visit

alpha

Type I error for the one-sided test

Details

The results with continuity correction are not necessarily different from those without continuity correction. The need for continuity correction can be determined through simulations on the type I error (see Gao and Zhang, 2004).

Value

A named list whose components depend on whether a second-look efficacy boundary was supplied. When r_2_e is NA the list contains p_value and Confidence interval; otherwise it contains four components, reported without and with continuity correction:

p_value

P-value of the test of the null hypothesis that the response rate equals p_0 at the final analysis; returned when r_2_e is NA

Confidence interval

Numeric vector of length 3 holding the lower limit, the point estimate and the upper limit of the two-sided (1 - 2*alpha) confidence interval for the response rate; returned when r_2_e is NA

p_no_correction

P-value at the final analysis computed without continuity correction

p_correction

The same p-value computed with the 0.5 continuity correction

CI_withot_correction

Numeric vector of length 3 holding the lower limit, the point estimate and the upper limit of the two-sided (1 - 2*alpha) confidence interval for the response rate, computed without continuity correction

CI_with_correction

The same confidence interval computed with the 0.5 continuity correction

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)


Group sequential designs / Adaptive sequential designs: Interim analysis, Non-survival analysis, Use theta_interim

Description

Group sequential designs / Adaptive sequential designs: Interim analysis, Non-survival analysis, Use theta_interim

Usage

asd_new_design(
  s,
  c_bry,
  inter_vt,
  snew,
  theta_hat_inter,
  theta_hat_inter_sd,
  n_control_inter,
  beta
)

Arguments

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

c_bry

Vector of critical boundaries for each analysis

inter_vt

Index of the interim analysis at which the sample size is re-estimated (1-based); must be less than length(s)

snew

Vector of new information fractions after the sample size is changed, e.g. c(0.5, 1); the fractions are relative to the new total information and the last element must be 1

theta_hat_inter

Treatment effect estimate observed at the interim analysis, e.g. the difference of the observed means or event rates between the test arm and the control arm

theta_hat_inter_sd

Standard error of 'theta_hat_inter'

n_control_inter

Sample size of the control arm at the interim analysis

beta

Type II error rate, i.e. 1 - power

Value

A named list with the following components:

Interim analysis hypothesis test

Character string giving the outcome of the interim hypothesis test: whether the null hypothesis was rejected at the interim analysis

Wald statistics

Wald statistic of the treatment effect observed at the interim analysis

Critical boundary

Planned critical boundary at the interim analysis at which the sample size is re-estimated

Estimated effect size: theta

The effect size used for the conditional power calculation, taken to be the treatment effect estimate observed at the interim analysis

c_alpha

Conditional type I error at the interim analysis, calculated by setting theta = 0

c_power_theta

Conditional power at the interim analysis using the estimated effect size theta

N_control_new

New sample size for the control arm after the sample size re-estimation, or 'NA' if the null hypothesis was rejected at the interim analysis or if the estimated effect size is < 0.001

new information fraction

The new information fractions after the sample size change

New critical boundary

New critical boundaries for the new interim analyses (O'Brien-Fleming type), or 'NA' if they were not calculated

Examples

asd_new_design(s = c(1/3, 2/3, 1), c_bry = c(3.984298, 3.961146, 2.349682), inter_vt = 1,
snew = c(0.5, 1), theta_hat_inter = 0.3, theta_hat_inter_sd = 0.5,
n_control_inter = 100, beta = 0.1)


Group sequential designs / Adaptive sequential designs: Interim analysis, Survival analysis, Use theta_interim

Description

Group sequential designs / Adaptive sequential designs: Interim analysis, Survival analysis, Use theta_interim

Usage

asd_new_design_survival(
  s,
  c_bry,
  inter_vt,
  snew,
  theta_hat_inter,
  theta_hat_inter_sd,
  events_inter,
  beta
)

Arguments

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

c_bry

Vector of critical boundaries for each analysis

inter_vt

Index of the interim analysis at which the sample size is re-estimated (1-based); must be less than length(s)

snew

Vector of new information fractions after the sample size is changed, e.g. c(0.5, 1); the fractions are relative to the new total information and the last element must be 1

theta_hat_inter

Treatment effect estimate observed at the interim analysis, i.e. minus the log of the observed hazard ratio

theta_hat_inter_sd

Standard error of 'theta_hat_inter'

events_inter

Number of events observed at the interim analysis

beta

Type II error rate, i.e. 1 - power

Value

A named list with the following components:

Interim analysis hypothesis test

Character string giving the outcome of the interim hypothesis test: whether the null hypothesis was rejected at the interim analysis

Wald statistics

Wald statistic of the treatment effect observed at the interim analysis

Critical boundary

Planned critical boundary at the interim analysis at which the sample size is re-estimated

Estimated effect size: theta

The effect size used for the conditional power calculation, taken to be the treatment effect estimate observed at the interim analysis

c_alpha

Conditional type I error at the interim analysis, calculated by setting theta = 0

c_power_theta

Conditional power at the interim analysis using the estimated effect size theta

events_new

New total number of events required after the sample size re-estimation, or 'NA' if the null hypothesis was rejected at the interim analysis or if the estimated effect size is < 0.001

New information fraction

The new information fractions after the sample size change

New critical boundary

New critical boundaries for the new interim analyses (O'Brien-Fleming type), or 'NA' if they were not calculated

Examples

asd_new_design_survival(s = c(1/3, 2/3, 1), c_bry = c(3.984298, 3.961146, 2.349682),
inter_vt = 1, snew = c(0.5, 1), theta_hat_inter = 0.3, theta_hat_inter_sd = 0.5,
events_inter = 100, beta = 0.1)


Group sequential designs / Adaptive sequential designs: Interim analysis, Non-survival analysis, Input theta

Description

Group sequential designs / Adaptive sequential designs: Interim analysis, Non-survival analysis, Input theta

Usage

asd_new_design_theta(
  theta,
  s,
  c_bry,
  inter_vt,
  snew,
  theta_hat_inter,
  theta_hat_inter_sd,
  n_control_inter,
  beta
)

Arguments

theta

Assumed effect size used for the conditional power calculation; different values of theta can be entered to check the sensitivity of the conditional power to the effect size; if theta < 0.001 the new sample size and the new critical boundary are returned as 'NA'

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

c_bry

Vector of critical boundaries for each analysis

inter_vt

Index of the interim analysis at which the sample size is re-estimated (1-based); must be less than length(s)

snew

Vector of new information fractions after the sample size is changed, e.g. c(0.5, 1); the fractions are relative to the new total information and the last element must be 1

theta_hat_inter

Treatment effect estimate observed at the interim analysis, e.g. the difference of the observed means or event rates between the test arm and the control arm

theta_hat_inter_sd

Standard error of 'theta_hat_inter'

n_control_inter

Sample size of the control arm at the interim analysis

beta

Type II error rate, i.e. 1 - power

Value

A named list with the following components:

Interim analysis hypothesis test

Character string giving the outcome of the interim hypothesis test: whether the null hypothesis was rejected at the interim analysis

Wald statistics

Wald statistic of the treatment effect observed at the interim analysis

Critical boundary

Planned critical boundary at the interim analysis at which the sample size is re-estimated

Assumed effect size: theta

The assumed effect size theta used for the conditional power calculation

c_alpha

Conditional type I error at the interim analysis, calculated by setting theta = 0

c_power_theta

Conditional power at the interim analysis using the assumed effect size theta

N_control_new

New sample size for the control arm after the sample size re-estimation, or 'NA' if the null hypothesis was rejected at the interim analysis or if theta < 0.001

new information fraction

The new information fractions after the sample size change

New critical boundary

New critical boundaries for the new interim analyses (O'Brien-Fleming type), or 'NA' if they were not calculated

Examples

asd_new_design_theta(theta = 0.2, s = c(1/3, 2/3, 1), c_bry = c(3.984298, 3.961146, 2.349682),
inter_vt = 1, snew = c(0.5, 1), theta_hat_inter = 0.3, theta_hat_inter_sd = 0.5,
n_control_inter = 100, beta = 0.1)


Group sequential designs / Adaptive sequential designs: Interim analysis, Survival analysis, Input theta

Description

Group sequential designs / Adaptive sequential designs: Interim analysis, Survival analysis, Input theta

Usage

asd_new_design_theta_survival(
  theta,
  s,
  c_bry,
  inter_vt,
  snew,
  theta_hat_inter,
  theta_hat_inter_sd,
  events_inter,
  beta
)

Arguments

theta

Assumed effect size used for the conditional power calculation, i.e. minus the log of the hazard ratio; different values of theta can be entered to check the sensitivity of the conditional power to the effect size; if theta < 0.001 the new number of events and the new critical boundary are returned as 'NA'

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

c_bry

Vector of critical boundaries for each analysis

inter_vt

Index of the interim analysis at which the sample size is re-estimated (1-based); must be less than length(s)

snew

Vector of new information fractions after the sample size is changed, e.g. c(0.5, 1); the fractions are relative to the new total information and the last element must be 1

theta_hat_inter

Treatment effect estimate observed at the interim analysis, i.e. minus the log of the observed hazard ratio

theta_hat_inter_sd

Standard error of 'theta_hat_inter'

events_inter

Number of events observed at the interim analysis

beta

Type II error rate, i.e. 1 - power

Value

A named list with the following components:

Interim analysis hypothesis test

Character string giving the outcome of the interim hypothesis test: whether the null hypothesis was rejected at the interim analysis

Wald statistics

Wald statistic of the treatment effect observed at the interim analysis

Critical boundary

Planned critical boundary at the interim analysis at which the sample size is re-estimated

Assumed effect size: theta

The assumed effect size theta used for the conditional power calculation

c_alpha

Conditional type I error at the interim analysis, calculated by setting theta = 0

c_power_theta

Conditional power at the interim analysis using the assumed effect size theta

events_new

New total number of events required after the sample size re-estimation, or 'NA' if the null hypothesis was rejected at the interim analysis or if theta < 0.001

New information fraction

The new information fractions after the sample size change

New critical boundary

New critical boundaries for the new interim analyses (O'Brien-Fleming type), or 'NA' if they were not calculated

Examples

asd_new_design_theta_survival(theta = 0.2, s = c(1/3, 2/3, 1),
c_bry = c(3.984298, 3.961146, 2.349682), inter_vt = 1, snew = c(0.5, 1), theta_hat_inter = 0.3,
theta_hat_inter_sd = 0.5, events_inter = 100, beta = 0.1)


Group sequential designs / Adaptive sequential designs: Simulations, Binary distribution, Operating characteristics

Description

Group sequential designs / Adaptive sequential designs: Simulations, Binary distribution, Operating characteristics

Usage

asd_power_simu_binary(
  p_t,
  p_c,
  direction,
  s,
  bry_type,
  alpha_2,
  samsz,
  N_max,
  theta_cut,
  beta,
  sim_num
)

Arguments

p_t

Event rate of the test arm; must be between 0 and 1

p_c

Event rate of the control arm; must be between 0 and 1

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = Pocock, 3 = alpha-spending

alpha_2

Type I error for the two-sided test; must be between 0 and 1, and alpha_2/2 is the one-sided type I error used for the critical boundaries

samsz

Planned sample size of the control arm; the trial starts from this sample size and it is increased only if the conditional power at the interim analysis is below the target

N_max

Maximum sample size of the control arm allowed for the sample size change; the re-estimated sample size is truncated at N_max

theta_cut

Lack of efficacy threshold on the effect-size scale: if the observed interim effect size is below theta_cut, the trial continues to the planned sample size with no sample size increase and no early termination for futility

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; must be between 0 and 1

sim_num

Number of simulation replicates; must be > 0

Value

A named list with the following components:

Sequential design and rejection by look

Data frame with one row per analysis and the columns Looks, Information fraction, Critical boundaries, Sample size increase (the rate of sample size increase attributed to each look) and Rejection by look (the rejection rate at each interim analysis)

Power and sample size

Named vector with the components Rejection rate without SSR, Rejection rate with SSR, Rate of sample size increase, Rejection rate without SSR/(meeting sample size incerase criteria), Rejection rate with SSR/(sample size incerase), Futility rate, Planned control sample size, Maximum control sample size, Mean control sample size and mean control sample size conditional on increase

References

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

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_power_simu_binary(p_t = 0.4, p_c = 0.2, direction = 1, s = c(1/3,2/3,1), bry_type = 1,
alpha_2 = 0.05, samsz = 107, N_max = 500, theta_cut = 0.05, beta = 0.1, sim_num = 20)


Group sequential designs / Adaptive sequential designs: Simulations, Negative binomial distribution, Operating characteristics

Description

Group sequential designs / Adaptive sequential designs: Simulations, Negative binomial distribution, Operating characteristics

Usage

asd_power_simu_neg_binomial(
  r_t,
  r_c,
  kappa,
  direction,
  s,
  bry_type,
  alpha_2,
  samsz,
  N_max,
  theta_cut,
  beta,
  sim_num
)

Arguments

r_t

Mean of the test arm; must be > 0

r_c

Mean of the control arm; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

direction

Test direction: 1 = larger r is better, otherwise smaller r is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = Pocock, 3 = alpha-spending

alpha_2

Type I error for the two-sided test; must be between 0 and 1, and alpha_2/2 is the one-sided type I error used for the critical boundaries

samsz

Planned sample size of the control arm; the trial starts from this sample size and it is increased only if the conditional power at the interim analysis is below the target

N_max

Maximum sample size of the control arm allowed for the sample size change; the re-estimated sample size is truncated at N_max

theta_cut

Lack of efficacy threshold on the effect-size scale: if the observed interim effect size is below theta_cut, the trial continues to the planned sample size with no sample size increase and no early termination for futility

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; must be between 0 and 1

sim_num

Number of simulation replicates; must be > 0

Value

A named list with the following components:

Sequential design and rejection by look

Data frame with one row per analysis and the columns Looks, Information fraction, Critical boundaries, Sample size increase (the rate of sample size increase attributed to each look) and Rejection by look (the rejection rate at each interim analysis)

Power and sample size

Named vector with the components Rejection rate without SSR, Rejection rate with SSR, Rate of sample size increase, Rejection rate without SSR/(meeting sample size incerase criteria), Rejection rate with SSR/(sample size incerase), Futility rate, Planned control sample size, Maximum control sample size, Mean control sample size and mean control sample size conditional on increase

References

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

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_power_simu_neg_binomial(r_t = 0.3, r_c = 0.2, kappa = 1, direction = 1, s = c(1/3,2/3,1),
bry_type = 1, alpha_2 = 0.05, samsz = 112, N_max = 200, theta_cut = 0.01,
beta = 0.1, sim_num = 20)


Group sequential designs / Adaptive sequential designs: Simulations, Normal distribution, Operating characteristics

Description

Group sequential designs / Adaptive sequential designs: Simulations, Normal distribution, Operating characteristics

Usage

asd_power_simu_normal(
  mu_t,
  mu_c,
  sigma_t,
  sigma_c,
  direction,
  s,
  bry_type,
  alpha_2,
  samsz,
  N_max,
  theta_cut,
  beta,
  sim_num
)

Arguments

mu_t

Mean of the test arm

mu_c

Mean of the control arm

sigma_t

Common standard deviation of the test arm and the control arm; must be > 0

sigma_c

Common standard deviation of the test arm and the control arm; must be > 0

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = Pocock, 3 = alpha-spending

alpha_2

Type I error for the two-sided test; must be between 0 and 1, and alpha_2/2 is the one-sided type I error used for the critical boundaries

samsz

Planned sample size of the control arm; the trial starts from this sample size and it is increased only if the conditional power at the interim analysis is below the target

N_max

Maximum sample size of the control arm allowed for the sample size change; the re-estimated sample size is truncated at N_max

theta_cut

Lack of efficacy threshold on the effect-size scale: if the observed interim effect size is below theta_cut, the trial continues to the planned sample size with no sample size increase and no early termination for futility

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; must be between 0 and 1

sim_num

Number of simulation replicates; must be > 0

Value

A named list with the following components:

Sequential design and rejection by look

Data frame with one row per analysis and the columns Looks, Information fraction, Critical boundaries, Sample size increase (the rate of sample size increase attributed to each look) and Rejection by look (the rejection rate at each interim analysis)

Power and sample size

Named vector with the components Rejection rate without SSR, Rejection rate with SSR, Rate of sample size increase, Rejection rate without SSR/(meeting sample size incerase criteria), Rejection rate with SSR/(sample size incerase), Futility rate, Planned control sample size, Maximum control sample size, Mean control sample size and mean control sample size conditional on increase

References

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

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_power_simu_normal(mu_t = 0, mu_c = 0, sigma_t = 1, sigma_c = 1, direction = 1,
s = c(1/3,2/3,1), bry_type = 1, alpha_2 = 0.05, samsz = 100, N_max = 500, theta_cut = 0.05,
beta = 0.1, sim_num = 20)


Group sequential designs / Adaptive sequential designs: Simulations, Poisson distribution, Operating characteristics

Description

Group sequential designs / Adaptive sequential designs: Simulations, Poisson distribution, Operating characteristics

Usage

asd_power_simu_poisson(
  lambda_t,
  lambda_c,
  direction,
  s,
  bry_type,
  alpha_2,
  samsz,
  N_max,
  theta_cut,
  beta,
  sim_num
)

Arguments

lambda_t

Mean event rate of the test arm; must be > 0

lambda_c

Mean event rate of the control arm; must be > 0

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = Pocock, 3 = alpha-spending

alpha_2

Type I error for the two-sided test; must be between 0 and 1, and alpha_2/2 is the one-sided type I error used for the critical boundaries

samsz

Planned sample size of the control arm; the trial starts from this sample size and it is increased only if the conditional power at the interim analysis is below the target

N_max

Maximum sample size of the control arm allowed for the sample size change; the re-estimated sample size is truncated at N_max

theta_cut

Lack of efficacy threshold on the effect-size scale: if the observed interim effect size is below theta_cut, the trial continues to the planned sample size with no sample size increase and no early termination for futility

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; must be between 0 and 1

sim_num

Number of simulation replicates; must be > 0

Value

A named list with the following components:

Sequential design and rejection by look

Data frame with one row per analysis and the columns Looks, Information fraction, Critical boundaries, Sample size increase (the rate of sample size increase attributed to each look) and Rejection by look (the rejection rate at each interim analysis)

Power and sample size

Named vector with the components Rejection rate without SSR, Rejection rate with SSR, Rate of sample size increase, Rejection rate without SSR/(meeting sample size incerase criteria), Rejection rate with SSR/(sample size incerase), Futility rate, Planned control sample size, Maximum control sample size, Mean control sample size and mean control sample size conditional on increase

References

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

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_power_simu_poisson(lambda_t = 1.1, lambda_c = 0.8, direction = 1, s = c(1/3,2/3,1),
bry_type = 1, alpha_2 = 0.05, samsz = 100, N_max = 200, theta_cut = 0.01,
beta = 0.1, sim_num = 20)


Group sequential designs / Adaptive sequential designs: Simulations, Survival analysis, Operating characteristics

Description

Group sequential designs / Adaptive sequential designs: Simulations, Survival analysis, Operating characteristics

Usage

asd_power_simu_survival(
  HR,
  s,
  bry_type,
  alpha_2,
  evt_num,
  evt_max,
  HR_cut,
  surv_rate,
  beta,
  sim_num
)

Arguments

HR

Hazards ratio of the test arm vs. the control arm; HR < 1 favours the test arm

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = Pocock, 3 = alpha-spending

alpha_2

Type I error for the two-sided test; must be between 0 and 1, and alpha_2/2 is the one-sided type I error used for the critical boundaries

evt_num

Planned total number of events at the final analysis; the trial starts from this number of events and it is increased only if the conditional power at the interim analysis is below the target

evt_max

Maximum number of events allowed for the sample size change; the re-estimated number of events is truncated at evt_max

HR_cut

Lack of efficacy threshold on the hazards-ratio scale; the corresponding threshold on the log-hazards-ratio scale is theta_cut = -log(HR_cut). If the observed interim log-hazards-ratio is below theta_cut (i.e. the observed HR is greater than HR_cut), the trial continues to the planned number of events with no sample size increase and no early termination for futility

surv_rate

Survival rate at the end of the trial, used together with the number of events to derive the sample size; must be between 0 and 1

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; must be between 0 and 1

sim_num

Number of simulation replicates; must be > 0

Value

A named list with the following components:

Sequential design and rejection by look

Data frame with one row per analysis and the columns Looks, Information fraction, Critical boundaries, Sample size increase (the rate of sample size increase attributed to each look) and Rejection by look (the rejection rate at each interim analysis)

Power and sample size

Named vector with the components Rejection rate without SSR, Rejection rate with SSR, Rate of sample size increase, Rejection rate without SSR/(meeting sample size incerase criteria), Rejection rate with SSR/(sample size incerase), Futility rate, Planned control sample size (the planned number of events), Maximum control sample size (the maximum number of events allowed), Mean control sample size (the mean simulated number of events) and mean control sample size conditional on increase

References

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

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_power_simu_survival(HR = 0.8, s = c(1/3,2/3,1), bry_type = 1, alpha_2 = 0.05, evt_num = 845,
evt_max = 1500, HR_cut = 0.95, surv_rate = 0.5, beta = 0.1, sim_num = 20)


Group sequential designs / Adaptive sequential designs: Simulations, Binary distribution, Optimizing adaptive sequential design

Description

Group sequential designs / Adaptive sequential designs: Simulations, Binary distribution, Optimizing adaptive sequential design

Usage

asd_simu_OC_binary(
  p_t,
  p_c,
  direction,
  s1,
  s2,
  alpha_2,
  alpha_2_alps_s1,
  alpha_2_alps_s2,
  theta_cut,
  samsz_1,
  samsz_2,
  N_max_1,
  N_max_2,
  beta,
  sim_num
)

Arguments

p_t

Event rate of the test arm; must be between 0 and 1. The simulation grid varies p_t over the values supplied

p_c

Event rate of the control arm; must be between 0 and 1

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s1

Vector of information fractions of the first interim analysis schedule, e.g. c(1/3, 2/3, 1); the last element must be 1

s2

Vector of information fractions of the second interim analysis schedule, e.g. c(0.5, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; must be between 0 and 1, and alpha_2/2 is the one-sided type I error used for the critical boundaries

alpha_2_alps_s1

Two-sided type I error spent at the interim analyses of schedule s1 with the alpha-spending boundary; each element must be between 0 and 1 and the elements must sum to alpha_2

alpha_2_alps_s2

Two-sided type I error spent at the interim analyses of schedule s2 with the alpha-spending boundary; each element must be between 0 and 1 and the elements must sum to alpha_2

theta_cut

Lack of efficacy threshold on the effect-size scale: if the observed interim effect size is below theta_cut, the trial continues to the planned sample size with no sample size increase and no early termination for futility

samsz_1

Planned sample size of the control arm for the first scenario of the simulation grid

samsz_2

Planned sample size of the control arm for the second scenario of the simulation grid

N_max_1

Maximum sample size of the control arm allowed for the sample size change in the first scenario of the simulation grid

N_max_2

Maximum sample size of the control arm allowed for the sample size change in the second scenario of the simulation grid

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; must be between 0 and 1

sim_num

Number of simulation replicates; must be > 0

Value

A named list with six components, one for each combination of critical boundary type (O'Brien-Fleming, Pocock, alpha-spending) and interim analysis schedule (s1, s2):

O'Brien-Fleming boundaries, interim analysis schedule=s1

Named list with the group sequential design (Looks, Information fractions, O'Brien-Fleming boundaries) and the simulation results for the four combinations of planned sample size (samsz_1, samsz_2) and maximum sample size (N_max_1, N_max_2), each a data frame with one row per test-arm event rate and the columns p<sub>t1</sub>,..., p<sub>c</sub>, sample size for fixed design, Rejection rate without SSR, Rejection rate with SSR, Rate of sample size increase, Rejection rate without SSR/(meeting sample size incerase criteria), Rejection rate with SSR/(sample size incerase), Futility rate, Planned control sample size, Maximum control sample size, Mean control sample size and mean control sample size conditional on increase

O'Brien-Fleming boundaries, interim analysis schedule=s2

The same group sequential design and simulation results computed with the information fractions s2

Pocock boundaries, interim analysis schedule=s1

The same group sequential design and simulation results computed with Pocock boundaries and the information fractions s1

Pocock boundaries, interim analysis schedule=s2

The same group sequential design and simulation results computed with Pocock boundaries and the information fractions s2

Alpha-spending boundaries, interim analysis schedule=s1

The same group sequential design and simulation results computed with alpha-spending boundaries and the information fractions s1

Alpha-spending boundaries, interim analysis schedule=s2

The same group sequential design and simulation results computed with alpha-spending boundaries and the information fractions s2

References

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

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


set.seed(1)
asd_simu_OC_binary(p_t = c(0.3,0.35,0.4), p_c = 0.2, direction = 1, s1 = c(1/3,2/3,1),
s2 = c(0.5,1), alpha_2 = 0.05, alpha_2_alps_s1 = c(0.001,0.001,0.048),
alpha_2_alps_s2 = c(0.001,0.049), theta_cut = 0.01, samsz_1 = 100, samsz_2 = 150,
N_max_1 = 1000, N_max_2 = 1500, beta = 0.1, sim_num = 20)



Group sequential designs / Adaptive sequential designs: Simulations, Negative binomial distribution, Optimizing adaptive sequential design

Description

Group sequential designs / Adaptive sequential designs: Simulations, Negative binomial distribution, Optimizing adaptive sequential design

Usage

asd_simu_OC_neg_binomial(
  r_t,
  r_c,
  kappa,
  direction,
  s1,
  s2,
  alpha_2,
  alpha_2_alps_s1,
  alpha_2_alps_s2,
  theta_cut,
  samsz_1,
  samsz_2,
  N_max_1,
  N_max_2,
  beta,
  sim_num
)

Arguments

r_t

Mean of the test arm; must be > 0. The simulation grid varies r_t over the values supplied

r_c

Mean of the control arm; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

direction

Test direction: 1 = larger r is better, otherwise smaller r is better

s1

Vector of information fractions of the first interim analysis schedule, e.g. c(1/3, 2/3, 1); the last element must be 1

s2

Vector of information fractions of the second interim analysis schedule, e.g. c(0.5, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; must be between 0 and 1, and alpha_2/2 is the one-sided type I error used for the critical boundaries

alpha_2_alps_s1

Two-sided type I error spent at the interim analyses of schedule s1 with the alpha-spending boundary; each element must be between 0 and 1 and the elements must sum to alpha_2

alpha_2_alps_s2

Two-sided type I error spent at the interim analyses of schedule s2 with the alpha-spending boundary; each element must be between 0 and 1 and the elements must sum to alpha_2

theta_cut

Lack of efficacy threshold on the effect-size scale: if the observed interim effect size is below theta_cut, the trial continues to the planned sample size with no sample size increase and no early termination for futility

samsz_1

Planned sample size of the control arm for the first scenario of the simulation grid

samsz_2

Planned sample size of the control arm for the second scenario of the simulation grid

N_max_1

Maximum sample size of the control arm allowed for the sample size change in the first scenario of the simulation grid

N_max_2

Maximum sample size of the control arm allowed for the sample size change in the second scenario of the simulation grid

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; must be between 0 and 1

sim_num

Number of simulation replicates; must be > 0

Value

A named list with six components, one for each combination of critical boundary type (O'Brien-Fleming, Pocock, alpha-spending) and interim analysis schedule (s1, s2):

O'Brien-Fleming boundaries, interim analysis schedule=s1

Named list with the group sequential design (Looks, Information fractions, O'Brien-Fleming boundaries) and the simulation results for the four combinations of planned sample size (samsz_1, samsz_2) and maximum sample size (N_max_1, N_max_2), each a data frame with one row per test-arm mean and the columns r<sub>t1</sub>,..., r<sub>c</sub>, sample size for fixed design, Rejection rate without SSR, Rejection rate with SSR, Rate of sample size increase, Rejection rate without SSR/(meeting sample size incerase criteria), Rejection rate with SSR/(sample size incerase), Futility rate, Planned control sample size, Maximum control sample size, Mean control sample size and mean control sample size conditional on increase

O'Brien-Fleming boundaries, interim analysis schedule=s2

The same group sequential design and simulation results computed with the information fractions s2

Pocock boundaries, interim analysis schedule=s1

The same group sequential design and simulation results computed with Pocock boundaries and the information fractions s1

Pocock boundaries, interim analysis schedule=s2

The same group sequential design and simulation results computed with Pocock boundaries and the information fractions s2

Alpha-spending boundaries, interim analysis schedule=s1

The same group sequential design and simulation results computed with alpha-spending boundaries and the information fractions s1

Alpha-spending boundaries, interim analysis schedule=s2

The same group sequential design and simulation results computed with alpha-spending boundaries and the information fractions s2

References

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

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


set.seed(1)
asd_simu_OC_neg_binomial(r_t = c(0.3,0.4,0.5), r_c = 0.2, kappa = 1, direction = 1,
s1 = c(1/3,2/3,1), s2 = c(0.5,1), alpha_2 = 0.05, alpha_2_alps_s1 = c(0.001,0.001,0.048),
alpha_2_alps_s2 = c(0.001,0.049), theta_cut = 0.01, samsz_1 = 100, samsz_2 = 150,
N_max_1 = 1000, N_max_2 = 1500, beta = 0.1, sim_num = 20)



Group sequential designs / Adaptive sequential designs: Simulations, Normal distribution, Optimizing adaptive sequential design

Description

Group sequential designs / Adaptive sequential designs: Simulations, Normal distribution, Optimizing adaptive sequential design

Usage

asd_simu_OC_normal(
  mu_t,
  mu_c,
  sigma_t,
  sigma_c,
  direction,
  s1,
  s2,
  alpha_2,
  alpha_2_alps_s1,
  alpha_2_alps_s2,
  theta_cut,
  samsz_1,
  samsz_2,
  N_max_1,
  N_max_2,
  beta,
  sim_num
)

Arguments

mu_t

Mean of the test arm

mu_c

Mean of the control arm

sigma_t

Common standard deviation of the test arm and the control arm; must be > 0

sigma_c

Common standard deviation of the test arm and the control arm; must be > 0

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s1

Vector of information fractions of the first interim analysis schedule, e.g. c(1/3, 2/3, 1); the last element must be 1

s2

Vector of information fractions of the second interim analysis schedule, e.g. c(0.5, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; must be between 0 and 1, and alpha_2/2 is the one-sided type I error used for the critical boundaries

alpha_2_alps_s1

Two-sided type I error spent at the interim analyses of schedule s1 with the alpha-spending boundary; each element must be between 0 and 1 and the elements must sum to alpha_2

alpha_2_alps_s2

Two-sided type I error spent at the interim analyses of schedule s2 with the alpha-spending boundary; each element must be between 0 and 1 and the elements must sum to alpha_2

theta_cut

Lack of efficacy threshold on the effect-size scale: if the observed interim effect size is below theta_cut, the trial continues to the planned sample size with no sample size increase and no early termination for futility

samsz_1

Planned sample size of the control arm for the first stage of the simulation grid

samsz_2

Planned sample size of the control arm for the second stage of the simulation grid

N_max_1

Maximum sample size of the control arm allowed for the sample size change in the first scenario of the simulation grid

N_max_2

Maximum sample size of the control arm allowed for the sample size change in the second scenario of the simulation grid

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; must be between 0 and 1

sim_num

Number of simulation replicates; must be > 0

Value

A named list with six components, one for each combination of critical boundary type (O'Brien-Fleming, Pocock, alpha-spending) and interim analysis schedule (s1, s2):

O'Brien-Fleming boundaries, interim analysis schedule=s1

Named list with the group sequential design (Looks, Information fractions, O'Brien-Fleming boundaries) and the simulation results for the four combinations of planned sample size (samsz_1, samsz_2) and maximum sample size (N_max_1, N_max_2), each a data frame with one row per test-arm mean and the columns mu_t1,..., mu_c, sample size for fixed design, Rejection rate without SSR, Rejection rate with SSR, Rate of sample size increase, Rejection rate without SSR/(meeting sample size incerase criteria), Rejection rate with SSR/(sample size incerase), Futility rate, Planned control sample size, Maximum control sample size, Mean control sample size, mean control sample size conditional on increase and Ratio of adaptive sample size over fixed sample size

O'Brien-Fleming boundaries, interim analysis schedule=s2

The same group sequential design and simulation results computed with the information fractions s2

Pocock boundaries, interim analysis schedule=s1

The same group sequential design and simulation results computed with Pocock boundaries and the information fractions s1

Pocock boundaries, interim analysis schedule=s2

The same group sequential design and simulation results computed with Pocock boundaries and the information fractions s2

Alpha-spending boundaries, interim analysis schedule=s1

The same group sequential design and simulation results computed with alpha-spending boundaries and the information fractions s1

Alpha-spending boundaries, interim analysis schedule=s2

The same group sequential design and simulation results computed with alpha-spending boundaries and the information fractions s2

References

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

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


set.seed(1)
asd_simu_OC_normal(mu_t = c(0.3,0.4,0.5), mu_c = 0.2, sigma_t = 1, sigma_c = 1, direction = 1,
s1 = c(1/3,2/3,1), s2 = c(0.5,1), alpha_2 = 0.05, alpha_2_alps_s1 = c(0.001,0.001,0.048),
alpha_2_alps_s2 = c(0.001,0.049), theta_cut = 0.01, samsz_1 = 100, samsz_2 = 150,
N_max_1 = 1000, N_max_2 = 1500, beta = 0.1, sim_num = 20)



Group sequential designs / Adaptive sequential designs: Simulations, Poisson distribution, Optimizing adaptive sequential design

Description

Group sequential designs / Adaptive sequential designs: Simulations, Poisson distribution, Optimizing adaptive sequential design

Usage

asd_simu_OC_poisson(
  lambda_t,
  lambda_c,
  direction,
  s1,
  s2,
  alpha_2,
  alpha_2_alps_s1,
  alpha_2_alps_s2,
  theta_cut,
  samsz_1,
  samsz_2,
  N_max_1,
  N_max_2,
  beta,
  sim_num
)

Arguments

lambda_t

Mean event rate of the test arm; must be > 0. The simulation grid varies lambda_t over the values supplied

lambda_c

Mean event rate of the control arm; must be > 0

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s1

Vector of information fractions of the first interim analysis schedule, e.g. c(1/3, 2/3, 1); the last element must be 1

s2

Vector of information fractions of the second interim analysis schedule, e.g. c(0.5, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; must be between 0 and 1, and alpha_2/2 is the one-sided type I error used for the critical boundaries

alpha_2_alps_s1

Two-sided type I error spent at the interim analyses of schedule s1 with the alpha-spending boundary; each element must be between 0 and 1 and the elements must sum to alpha_2

alpha_2_alps_s2

Two-sided type I error spent at the interim analyses of schedule s2 with the alpha-spending boundary; each element must be between 0 and 1 and the elements must sum to alpha_2

theta_cut

Lack of efficacy threshold on the effect-size scale: if the observed interim effect size is below theta_cut, the trial continues to the planned sample size with no sample size increase and no early termination for futility

samsz_1

Planned sample size of the control arm for the first scenario of the simulation grid

samsz_2

Planned sample size of the control arm for the second scenario of the simulation grid

N_max_1

Maximum sample size of the control arm allowed for the sample size change in the first scenario of the simulation grid

N_max_2

Maximum sample size of the control arm allowed for the sample size change in the second scenario of the simulation grid

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; must be between 0 and 1

sim_num

Number of simulation replicates; must be > 0

Value

A named list with six components, one for each combination of critical boundary type (O'Brien-Fleming, Pocock, alpha-spending) and interim analysis schedule (s1, s2):

O'Brien-Fleming boundaries, interim analysis schedule=s1

Named list with the group sequential design (Looks, Information fractions, O'Brien-Fleming boundaries) and the simulation results for the four combinations of planned sample size (samsz_1, samsz_2) and maximum sample size (N_max_1, N_max_2), each a data frame with one row per test-arm event rate and the columns lambda_t1,..., lambda_c, sample size for fixed design, Rejection rate without SSR, Rejection rate with SSR, Rate of sample size increase, Rejection rate without SSR/(meeting sample size incerase criteria), Rejection rate with SSR/(sample size incerase), Futility rate, Planned control sample size, Maximum control sample size, Mean control sample size and mean control sample size conditional on increase

O'Brien-Fleming boundaries, interim analysis schedule=s2

The same group sequential design and simulation results computed with the information fractions s2

Pocock boundaries, interim analysis schedule=s1

The same group sequential design and simulation results computed with Pocock boundaries and the information fractions s1

Pocock boundaries, interim analysis schedule=s2

The same group sequential design and simulation results computed with Pocock boundaries and the information fractions s2

Alpha-spending boundaries, interim analysis schedule=s1

The same group sequential design and simulation results computed with alpha-spending boundaries and the information fractions s1

Alpha-spending boundaries, interim analysis schedule=s2

The same group sequential design and simulation results computed with alpha-spending boundaries and the information fractions s2

References

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

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_simu_OC_poisson(lambda_t = c(0.3,0.4,0.5), lambda_c = 0.2, direction = 1, s1 = c(1/3,2/3,1),
s2 = c(0.5,1), alpha_2 = 0.05, alpha_2_alps_s1 = c(0.001,0.001,0.048),
alpha_2_alps_s2 = c(0.001,0.049), theta_cut = 0.01, samsz_1 = 50, samsz_2 = 80,
N_max_1 = 120, N_max_2 = 150, beta = 0.1, sim_num = 20)


Group sequential designs / Adaptive sequential designs: Simulations, Survival analysis, Optimizing adaptive sequential design

Description

Group sequential designs / Adaptive sequential designs: Simulations, Survival analysis, Optimizing adaptive sequential design

Usage

asd_simu_OC_survival(
  HR,
  s1,
  s2,
  alpha_2,
  alpha_2_alps_s1,
  alpha_2_alps_s2,
  surv_rate,
  evt_num_1,
  evt_num_2,
  evt_max_1,
  evt_max_2,
  HR_cut,
  beta,
  sim_num
)

Arguments

HR

Hazards ratio of the test arm vs. the control arm; HR < 1 favours the test arm. The simulation grid varies HR over the values supplied

s1

Vector of information fractions of the first interim analysis schedule, e.g. c(1/3, 2/3, 1); the last element must be 1

s2

Vector of information fractions of the second interim analysis schedule, e.g. c(0.5, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; must be between 0 and 1, and alpha_2/2 is the one-sided type I error used for the critical boundaries

alpha_2_alps_s1

Two-sided type I error spent at the interim analyses of schedule s1 with the alpha-spending boundary; each element must be between 0 and 1 and the elements must sum to alpha_2

alpha_2_alps_s2

Two-sided type I error spent at the interim analyses of schedule s2 with the alpha-spending boundary; each element must be between 0 and 1 and the elements must sum to alpha_2

surv_rate

Survival rate at the end of the trial, used together with the number of events to derive the sample size; must be between 0 and 1

evt_num_1

Planned number of events for the first scenario of the simulation grid

evt_num_2

Planned number of events for the second scenario of the simulation grid

evt_max_1

Maximum number of events allowed for the sample size change in the first scenario of the simulation grid

evt_max_2

Maximum number of events allowed for the sample size change in the second scenario of the simulation grid

HR_cut

Lack of efficacy threshold on the hazards-ratio scale; the corresponding threshold on the log-hazards-ratio scale is theta_cut = -log(HR_cut). If the observed interim log-hazards-ratio is below theta_cut (i.e. the observed HR is greater than HR_cut), the trial continues to the planned number of events with no sample size increase and no early termination for futility

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; must be between 0 and 1

sim_num

Number of simulation replicates; must be > 0

Value

A named list with six components, one for each combination of critical boundary type (O'Brien-Fleming, Pocock, alpha-spending) and interim analysis schedule (s1, s2):

O'Brien-Fleming boundaries, interim analysis schedule=s1

Named list with the group sequential design (Looks, Information fractions, O'Brien-Fleming boundaries) and the simulation results for the four combinations of planned number of events (evt_num_1, evt_num_2) and maximum number of events (evt_max_1, evt_max_2), each a data frame with one row per hazards ratio and the columns HR<sub>1</sub>,..., sample size for fixed design, Rejection rate without SSR, Rejection rate with SSR, Rate of sample size increase, Rejection rate without SSR/(meeting sample size incerase criteria), Rejection rate with SSR/(sample size incerase), Futility rate, Planned sample size (the planned number of events), Maximum sample size (the maximum number of events allowed), Mean sample size (the mean simulated number of events), mean sample size conditional on increase and Ratio of adaptive sample size over fixed sample size

O'Brien-Fleming boundaries, interim analysis schedule=s2

The same group sequential design and simulation results computed with the information fractions s2

Pocock boundaries, interim analysis schedule=s1

The same group sequential design and simulation results computed with Pocock boundaries and the information fractions s1

Pocock boundaries, interim analysis schedule=s2

The same group sequential design and simulation results computed with Pocock boundaries and the information fractions s2

Alpha-spending boundaries, interim analysis schedule=s1

The same group sequential design and simulation results computed with alpha-spending boundaries and the information fractions s1

Alpha-spending boundaries, interim analysis schedule=s2

The same group sequential design and simulation results computed with alpha-spending boundaries and the information fractions s2

References

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

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


set.seed(1)
asd_simu_OC_survival(HR = c(0.75,0.8,0.85), s1 = c(1/3,2/3,1), s2 = c(0.5,1), alpha_2 = 0.05,
alpha_2_alps_s1 = c(0.001,0.001,0.048), alpha_2_alps_s2 = c(0.001,0.049), surv_rate = 0.5,
evt_num_1 = 200, evt_num_2 = 300, evt_max_1 = 2000, evt_max_2 = 3000, HR_cut = 0.95, beta = 0.1,
sim_num = 20)



Fixed sample designs: Negative binomial distribution, Simulations

Description

Fixed sample designs: Negative binomial distribution, Simulations

Usage

fixed_rej_nbglm_simu(alpha_2, r_c, r_t, rand_ratio, kappa, samsz, sim_num)

Arguments

alpha_2

Type I error for the two-sided test

r_c

Event rate of the control arm; must be > 0

r_t

Event rate of the test arm; the null hypothesis is r_t >= r_c and the alternative hypothesis is r_t < r_c; must be > 0

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

kappa

Dispersion parameter of the negative binomial distribution; the negative binomial size parameter used in the simulation is 1/kappa, so kappa must be > 0 and a larger kappa means more overdispersion

samsz

Sample size of the control arm used in the simulation

sim_num

Number of simulation replicates

Value

A named list with the following components:

rejection rate

Simulated rejection rate of the two-sided Wald test from the negative binomial log-link GLM; this is the simulated power, and the type I error rate when r_t = r_c

mean size

Mean over the simulation replicates of the estimated negative binomial size (dispersion) parameter theta of the fitted GLM

Examples

fixed_rej_nbglm_simu(alpha_2 = 0.05, r_c = 1, r_t = 1*0.6, rand_ratio = 1, kappa = 1,
samsz = 188, sim_num = 20)


Fixed sample designs: Binary distribution, Simulations

Description

Fixed sample designs: Binary distribution, Simulations

Usage

fixed_rej_rate_binary(p_t, p_c, rand_ratio, alpha_2, samsz, sim_num)

Arguments

p_t

Event rate (probability of an event) of the test arm; the null hypothesis is p_t <= p_c and the alternative hypothesis is p_t > p_c; 0 < p_t < 1

p_c

Event rate (probability of an event) of the control arm; 0 < p_c < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

alpha_2

Type I error for the two-sided test

samsz

Sample size of the control arm used in the simulation

sim_num

Number of simulation replicates

Value

A named numeric value with the following component:

rejection rate

Simulated rejection rate of the two-sided fixed-sample Wald test of p_t = p_c; this is the simulated power, and the type I error rate when p_t = p_c

Examples

fixed_rej_rate_binary(p_t = 0.4, p_c = 0.2, rand_ratio = 1, alpha_2 = 0.05,
samsz = 106, sim_num = 20)


Fixed sample designs: Normal distribution, Simulations

Description

Fixed sample designs: Normal distribution, Simulations

Usage

fixed_rej_rate_normal(
  mu_t,
  mu_c,
  sigma_t,
  sigma_c,
  alpha_2,
  rand_ratio,
  samsz,
  sim_num
)

Arguments

mu_t

Mean of the test arm; the null hypothesis is mu_t <= mu_c and the alternative hypothesis is mu_t > mu_c

mu_c

Mean of the control arm

sigma_t

Standard deviation of the test arm

sigma_c

Standard deviation of the control arm

alpha_2

Type I error for the two-sided test

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

samsz

Sample size of the control arm used in the simulation

sim_num

Number of simulation replicates

Value

A named numeric value with the following component:

rejection rate

Simulated rejection rate of the two-sided fixed-sample Wald test of mu_t = mu_c; this is the simulated power, and the type I error rate when mu_t = mu_c

Examples

fixed_rej_rate_normal(mu_t = 0, mu_c = 0, sigma_t = 1, sigma_c = 1, alpha_2 = 0.05,
rand_ratio = 1, samsz = 82, sim_num = 20)


Fixed sample designs: Poisson distribution, Simulations

Description

Fixed sample designs: Poisson distribution, Simulations

Usage

fixed_rej_rate_poisson(lambda_t, lambda_c, rand_ratio, alpha_2, samsz, sim_num)

Arguments

lambda_t

Event rate of the test arm; the null hypothesis is lambda_t <= lambda_c and the alternative hypothesis is lambda_t > lambda_c; must be > 0

lambda_c

Event rate of the control arm; must be > 0

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

alpha_2

Type I error for the two-sided test

samsz

Sample size of the control arm used in the simulation

sim_num

Number of simulation replicates

Value

A named numeric value with the following component:

rejection rate

Simulated rejection rate of the two-sided fixed-sample Wald test of lambda_t = lambda_c; this is the simulated power, and the type I error rate when lambda_t = lambda_c

Examples

fixed_rej_rate_poisson(lambda_t = 11, lambda_c = 10, rand_ratio = 2, alpha_2 = 0.05,
samsz = 163, sim_num = 20)


Fixed sample designs: Survival analysis, Simulations

Description

Fixed sample designs: Survival analysis, Simulations

Usage

fixed_rej_rate_surv_cox(HR, evt_num, alpha_2, sim_num)

Arguments

HR

Hazard ratio of the test arm vs. the control arm; the null hypothesis is HR >= 1 and the alternative hypothesis is HR < 1; must be > 0

evt_num

Total number of events at the final analysis; the simulated data are truncated at the first observation at which this number of events is reached

alpha_2

Type I error for the two-sided test

sim_num

Number of simulation replicates

Value

A named numeric value with the following component:

rejection CPH

Simulated rejection rate of the two-sided Wald test from the Cox proportional hazards model; this is the simulated power, and the type I error rate when HR = 1

Examples

fixed_rej_rate_surv_cox(HR = 0.8, evt_num = 845, alpha_2 = 0.05, sim_num = 20)


Group sequential designs / Adaptive sequential designs: Final analysis, Without sample size change

Description

Group sequential designs / Adaptive sequential designs: Final analysis, Without sample size change

Usage

gsd_ci_est(s, c_bry, theta_hat_last, theta_hat_last_sd, last_vt, alpha_2)

Arguments

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

c_bry

Vector of critical boundaries for each analysis

theta_hat_last

Treatment effect estimate observed at the final analysis, i.e. the naive point estimate of the parameter of interest at the analysis at which the trial terminated

theta_hat_last_sd

Standard error of 'theta_hat_last'

last_vt

Index of the analysis at which the trial stopped (1-based); this can be the final analysis, at which s = 1, or an interim analysis, and it must not exceed length(s)

alpha_2

Type I error for the two-sided test

Value

A named list with the following components:

p-value

The p-value of the test of the null hypothesis that the treatment effect is 0

confidence interval

Numeric vector of length 3 giving the lower confidence limit, the median-unbiased point estimate and the upper confidence limit of the two-sided (1 - alpha_2) confidence interval

Examples

gsd_ci_est(s = c(1/3,2/3,1), c_bry = c(3.471095, 2.454434,2.004037), theta_hat_last = 2.004,
theta_hat_last_sd = 1, last_vt = 3, alpha_2 = 0.05)


Single arm phase 2 oncology trial: Final analysis: two stage design, no sample size change

Description

Single arm phase 2 oncology trial: 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

Superiority-stopping threshold at the first look: the trial would be stopped for superiority if at least r_1_e responses are observed at the first look. Enter NA when the design uses no efficacy boundary at the first look; the function then substitutes a boundary that cannot be crossed

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

Index of the analysis at which the trial stopped: 1 = first look, 2 = second (final) look

alpha

Type I error for the one-sided test

Details

The results with continuity correction are not necessarily different from those without continuity correction. The need for continuity correction can be determined through simulations on the type I error (see Gao and Zhang, 2004).

Value

A named list with the following components:

p_no_correction

P-value of the test of the null hypothesis that the response rate equals p_0, calculated at the analysis at which the trial stopped without continuity correction

p_correction

The same p-value calculated with the 0.5 continuity correction

CI_without_correction

Numeric vector of length 3 holding the lower limit, the point estimate and the upper limit of the two-sided (1 - 2*alpha) confidence interval for the response rate, computed without continuity correction

CI_with_correction

The same confidence interval computed with the 0.5 continuity correction

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)


Single arm phase 2 oncology trial: Final analysis: three stage design, no sample size change

Description

Single arm phase 2 oncology trial: 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; because the trial has proceeded to the third look, n_1, r_1 and r_2 of the original design are not needed for the final analysis

n_3

Number of patients at third look

r_2_e

Superiority-stopping threshold at the second look: 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; the function then substitutes a boundary that cannot be crossed

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

Index of the analysis at which the trial stopped: 2 = second look, 3 = third (final) look

alpha

Type I error for the one-sided test

Details

The results with continuity correction are not necessarily different from those without continuity correction. The need for continuity correction can be determined through simulations on the type I error (see Gao and Zhang, 2004).

Value

A named list with the following components:

p_no_correction

P-value of the test of the null hypothesis that the response rate equals p_0, calculated at the analysis at which the trial stopped without continuity correction

p_correction

The same p-value calculated with the 0.5 continuity correction

CI_withot_correction

Numeric vector of length 3 holding the lower limit, the point estimate and the upper limit of the two-sided (1 - 2*alpha) confidence interval for the response rate, computed without continuity correction

CI_with_correction

The same confidence interval computed with the 0.5 continuity correction

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)


Group sequential designs / Adaptive sequential designs: Simulations, Binary distribution, Type I error and power

Description

Group sequential designs / Adaptive sequential designs: Simulations, Binary distribution, Type I error and power

Usage

gsd_power_simu_binary(
  p_t,
  p_c,
  direction,
  s,
  bry_type,
  alpha_2,
  samsz,
  sim_num
)

Arguments

p_t

Event rate of the test arm; must be between 0 and 1

p_c

Event rate of the control arm; must be between 0 and 1

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = Pocock, 3 = alpha-spending

alpha_2

Type I error for the two-sided test; must be between 0 and 1, and alpha_2/2 is the one-sided type I error used for the critical boundaries

samsz

Planned sample size of the control arm used in the simulation; must be > 0

sim_num

Number of simulation replicates; must be > 0

Value

A named list with the following components:

Sequential design and rejection by look

Data frame with one row per analysis and the columns Looks, Information fraction, Critical boundaries and Rejection by look (the rejection rate at each interim analysis)

Power and sample size

Named vector with the components Planned control sample size (the sample size used in the simulation), Rejection rate (the simulated power, i.e. the type I error rate when p_t = p_c) and Mean control sample size (the mean simulated sample size)

References

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

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_power_simu_binary(p_t = 0.4, p_c = 0.4, direction = 1, s = c(1/3,2/3,1), bry_type = 1,
alpha_2 = 0.05, samsz = 100, sim_num = 20)


Group sequential designs / Adaptive sequential designs: Simulations, Negative binomial distribution, Type I error and power

Description

Group sequential designs / Adaptive sequential designs: Simulations, Negative binomial distribution, Type I error and power

Usage

gsd_power_simu_negbinom(
  r_t,
  r_c,
  kappa,
  direction,
  s,
  bry_type,
  alpha_2,
  samsz,
  sim_num
)

Arguments

r_t

Mean of the test arm; must be > 0

r_c

Mean of the control arm; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

direction

Test direction: 1 = larger r is better, otherwise smaller r is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = Pocock, 3 = alpha-spending

alpha_2

Type I error for the two-sided test; must be between 0 and 1, and alpha_2/2 is the one-sided type I error used for the critical boundaries

samsz

Planned sample size of the control arm used in the simulation; must be > 0

sim_num

Number of simulation replicates; must be > 0

Value

A named list with the following components:

Sequential design and rejection by look

Data frame with one row per analysis and the columns Looks, Information fraction, Critical boundaries and Rejection by look (the rejection rate at each interim analysis)

Power and sample size

Named vector with the components Planned control sample size (the sample size used in the simulation), Rejection rate (the simulated power, i.e. the type I error rate when r_t = r_c) and Mean control sample size (the mean simulated sample size)

References

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

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_power_simu_negbinom(r_t = 1.1, r_c = 1.1, kappa = 1, direction = 1, s = c(1/3,2/3,1),
bry_type = 1, alpha_2 = 0.05, samsz = 100, sim_num = 20)


Group sequential designs / Adaptive sequential designs: Simulations, Normal distribution, Type I error and power

Description

Group sequential designs / Adaptive sequential designs: Simulations, Normal distribution, Type I error and power

Usage

gsd_power_simu_normal(
  mu_t,
  mu_c,
  sigma_t,
  sigma_c,
  direction,
  s,
  bry_type,
  alpha_2,
  samsz,
  sim_num
)

Arguments

mu_t

Mean of the test arm

mu_c

Mean of the control arm

sigma_t

Common standard deviation of the test arm and the control arm; must be > 0

sigma_c

Common standard deviation of the test arm and the control arm; must be > 0

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = Pocock, 3 = alpha-spending

alpha_2

Type I error for the two-sided test; must be between 0 and 1, and alpha_2/2 is the one-sided type I error used for the critical boundaries

samsz

Planned sample size of the control arm used in the simulation; must be > 0

sim_num

Number of simulation replicates; must be > 0

Value

A named list with the following components:

Sequential design and rejection by look

Data frame with one row per analysis and the columns Looks, Information fraction, Critical boundaries and Rejection by look (the rejection rate at each interim analysis)

Power and sample size

Named vector with the components Rejection rate (the simulated power, i.e. the type I error rate when mu_t = mu_c), Planned control sample size (the sample size used in the simulation) and Mean control sample size (the mean simulated sample size)

References

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

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_power_simu_normal(mu_t = 0.4, mu_c = 0, sigma_t = 1, sigma_c = 1, direction = 1,
s = c(1/4,1/3,2/3,1), bry_type = 1, alpha_2 = 0.05, samsz = 100, sim_num = 20)


Group sequential designs / Adaptive sequential designs: Simulations, Poisson distribution, Type I error and power

Description

Group sequential designs / Adaptive sequential designs: Simulations, Poisson distribution, Type I error and power

Usage

gsd_power_simu_poisson(
  lambda_c,
  lambda_t,
  direction,
  s,
  bry_type,
  alpha_2,
  samsz,
  sim_num
)

Arguments

lambda_c

Mean event rate of the control arm; must be > 0

lambda_t

Mean event rate of the test arm; must be > 0

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = Pocock, 3 = alpha-spending

alpha_2

Type I error for the two-sided test; must be between 0 and 1, and alpha_2/2 is the one-sided type I error used for the critical boundaries

samsz

Planned sample size of the control arm used in the simulation; must be > 0

sim_num

Number of simulation replicates; must be > 0

Value

A named list with the following components:

Sequential design and rejection by look

Data frame with one row per analysis and the columns Looks, Information fraction, Critical boundaries and Rejection by look (the rejection rate at each interim analysis)

Power and sample size

Named vector with the components Planned control sample size (the sample size used in the simulation), Rejection rate (the simulated power, i.e. the type I error rate when lambda_t = lambda_c) and Mean control sample size (the mean simulated sample size)

References

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

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_power_simu_poisson(lambda_c = 0.5, lambda_t = 0.8, direction = 1, s = c(1/3,2/3,1),
bry_type = 1, alpha_2 = 0.05, samsz = 100, sim_num = 20)


Group sequential designs / Adaptive sequential designs: Simulations, Survival analysis, Type I error and power

Description

Group sequential designs / Adaptive sequential designs: Simulations, Survival analysis, Type I error and power

Usage

gsd_power_simu_survival(HR, s, bry_type, alpha_2, surv_rate, evt_num, sim_num)

Arguments

HR

Hazards ratio of the test arm vs. the control arm; HR < 1 favours the test arm

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = Pocock, 3 = alpha-spending

alpha_2

Type I error for the two-sided test; must be between 0 and 1, and alpha_2/2 is the one-sided type I error used for the critical boundaries

surv_rate

Survival rate at the end of the trial, used together with the number of events to derive the sample size; must be between 0 and 1

evt_num

Planned total number of events at the final analysis; must be > 0

sim_num

Number of simulation replicates; must be > 0

Value

A named list with the following components:

Sequential design and rejection by look

Data frame with one row per analysis and the columns Looks, Information fraction, Critical boundaries and Rejection by look (the rejection rate at each interim analysis)

Power and sample size

Named vector with the components Rejection rate (the simulated power, i.e. the type I error rate when HR = 1), Planned sample size (the planned number of events) and Mean sample size (the mean simulated number of events)

References

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

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_power_simu_survival(HR = 0.8, s = c(1/3,2/3,1), bry_type = 1, alpha_2 = 0.05,
surv_rate = 0.5, evt_num = 845, sim_num = 20)


Hybrid: Simulations, Binary distribution, Using given estimates of informative prior

Description

Hybrid: Simulations, Binary distribution, Using given estimates of informative prior

Usage

hybrid_fixed_prior_rej_binary_simu(
  t_prior,
  theta_prior,
  p_t,
  p_c,
  s,
  sampsz,
  N_max,
  theta_cut,
  cp_min,
  gamma,
  alpha_2,
  beta,
  sim_num
)

Arguments

t_prior

Prior information time: the prior distribution of theta = p_t - p_c is assumed to have a normal distribution, and the Fisher's information time is the reciprocal of the variance of the prior distribution; set t_prior = 0 for a non-informative prior

theta_prior

Mean effect size of prior: the mean of the normal prior distribution of theta = p_t - p_c; set theta_prior = 0 for a non-informative prior

p_t

Response rate (probability of response) in the test arm; 0 < p_t < 1. The effect size is theta = p_t - p_c. Enter p_t = p_c to verify type I error control and p_t > p_c for the power simulation

p_c

Response rate (probability of response) in the control arm; 0 < p_c < 1. The effect size is theta = p_t - p_c

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

sampsz

Planned sample size: the planned sample size at the final analysis

N_max

Maximum sample size: a user chosen, maximum allowable sample size for sample size modification

theta_cut

Futility threshold: a cut-off for theta_hat. In the simulations, if theta_hat at the interim analysis is at or below theta_cut the trial is considered futile and proceeds to the planned sample size without any change

cp_min

Promising zone cp_min: CP_min in the promising zone sample size re-estimation; a conditional power below cp_min is the unfavorable zone. The user should select this value from Mehta, Pocock (2011)

gamma

Parameter chosen for the credible interval modified predictive power (CI_MPP); it defines the (1 - gamma) credible interval of the posterior for theta, e.g. gamma = 0.5 gives a 50 percent interval

alpha_2

Type I error for the two-sided test

beta

Conditional type II error; 1 - beta is the target conditional power used for the sample size re-estimation

sim_num

Number of simulation replicates

Value

A named list with the following components:

rejection rate and mean sample size

A data frame with the columns "Prior type", "SSR method", "Rejection rate" and "Mean sample size", with one row per sample size re-estimation (SSR) method. The methods compared are the planned sample size with no SSR, the promising zone SSR, the SSR using the true effect size with conditional power, and, for both the non-informative prior and the informative prior, the cp SSR, pp SSR, mpp SSR and ci_mpp SSR methods

futility rate

The rate at which the observed theta_hat at the interim analysis is at or below theta_cut, so that the trial proceeds without any sample size change

References

A data frame of the references for the methods compared

References

Gao, P. Improving the effectiveness of sample size re-estimation: an operating characteristic focused, hybrid frequentist-Bayesian approach, Statistics in Medicine, 2025; 44:e10310. To link to this article: https://onlinelibrary.wiley.com/doi/10.1002/sim.10310.

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

C. R. Mehta, S. J. Pocock. Adaptive increase in sample size when interim results are promising: A practical guide with examples. Statistics in Medicine. Volume30, Issue28, 10 December 2011, Pages 3267-3284

Examples

hybrid_fixed_prior_rej_binary_simu(t_prior = 5, theta_prior = 0.2, p_t = 0.3, p_c = 0.3,
s = c(0.5,1), sampsz = 100, N_max = 150, theta_cut = 0.001, cp_min = 0.27, gamma = 0.5,
alpha_2 = 0.05, beta = 0.1, sim_num = 20)


Hybrid: Simulations, Negative binomial distribution, Using given estimates of informative prior

Description

Hybrid: Simulations, Negative binomial distribution, Using given estimates of informative prior

Usage

hybrid_fixed_prior_rej_negbinom_simu(
  t_prior,
  theta_prior,
  r_t,
  r_c,
  kappa,
  nu_t,
  rand_ratio,
  s,
  sampsz,
  N_max,
  theta_cut,
  cp_min,
  gamma,
  alpha_2,
  beta,
  sim_num
)

Arguments

t_prior

Prior information time: the prior distribution of theta = -log(r_t/r_c) is assumed to have a normal distribution, and the Fisher's information time is the reciprocal of the variance of the prior distribution; set t_prior = 0 for a non-informative prior

theta_prior

Mean effect size of prior: the mean of the normal prior distribution of theta = -log(r_t/r_c); set theta_prior = 0 for a non-informative prior

r_t

Event rate in the test arm; the effect size is theta = -log(r_t/r_c) and a smaller event rate is assumed to be associated with better efficacy. Enter r_t = r_c to verify type I error control and r_t < r_c for the power simulation

r_c

Event rate in the control arm; the effect size is theta = -log(r_t/r_c)

kappa

Dispersion parameter of the negative binomial distribution; must be > 0

nu_t

Exposure time for the negative binomial distribution; must be > 0

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

sampsz

Planned sample size: the planned sample size at the final analysis

N_max

Maximum sample size: a user chosen, maximum allowable sample size for sample size modification

theta_cut

Futility threshold: a cut-off for theta_hat. In the simulations, if theta_hat at the interim analysis is at or below theta_cut the trial is considered futile and proceeds to the planned sample size without any change

cp_min

Promising zone cp_min: CP_min in the promising zone sample size re-estimation; a conditional power below cp_min is the unfavorable zone. The user should select this value from Mehta, Pocock (2011)

gamma

Parameter chosen for the credible interval modified predictive power (CI_MPP); it defines the (1 - gamma) credible interval of the posterior for theta, e.g. gamma = 0.5 gives a 50 percent interval

alpha_2

Type I error for the two-sided test

beta

Conditional type II error; 1 - beta is the target conditional power used for the sample size re-estimation

sim_num

Number of simulation replicates

Value

A named list with the following components:

rejection rate and mean sample size

A data frame with the columns "Prior type", "SSR method", "Rejection rate" and "Mean sample size", with one row per sample size re-estimation (SSR) method. The methods compared are the planned sample size with no SSR, the promising zone SSR, the SSR using the true effect size with conditional power, and, for both the non-informative prior and the informative prior, the cp SSR, pp SSR, mpp SSR and ci_mpp SSR methods

futility rate

The rate at which the observed theta_hat at the interim analysis is at or below theta_cut, so that the trial proceeds without any sample size change

References

A data frame of the references for the methods compared

References

Gao, P. Improving the effectiveness of sample size re-estimation: an operating characteristic focused, hybrid frequentist-Bayesian approach, Statistics in Medicine, 2025; 44:e10310. To link to this article: https://onlinelibrary.wiley.com/doi/10.1002/sim.10310.

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

C. R. Mehta, S. J. Pocock. Adaptive increase in sample size when interim results are promising: A practical guide with examples. Statistics in Medicine. Volume30, Issue28, 10 December 2011, Pages 3267-3284

Examples

hybrid_fixed_prior_rej_negbinom_simu(t_prior = 5, theta_prior = 0.2, r_t = 1, r_c = 1,
kappa = 1, nu_t = 1, rand_ratio = 1, s = c(0.5,1), sampsz = 100, N_max = 150,
theta_cut = 0.001, cp_min = 0.27, gamma = 0.5, alpha_2 = 0.05, beta = 0.1, sim_num = 20)


Hybrid: Simulations, Normal distribution, Using given estimates of informative prior

Description

Hybrid: Simulations, Normal distribution, Using given estimates of informative prior

Usage

hybrid_fixed_prior_rej_normal_simu(
  t_prior,
  theta_prior,
  mu,
  sigma,
  s,
  sampsz,
  N_max,
  theta_cut,
  cp_min,
  gamma,
  alpha_2,
  beta,
  sim_num
)

Arguments

t_prior

Prior information time: the prior distribution of theta = mu_t - mu_c is assumed to have a normal distribution, and the Fisher's information time is the reciprocal of the variance of the prior distribution; set t_prior = 0 for a non-informative prior

theta_prior

Mean effect size of prior: the mean of the normal prior distribution of theta = mu_t - mu_c; set theta_prior = 0 for a non-informative prior

mu

Effect size (difference in means) of the current trial: theta = mu_t - mu_c, where mu_t is the mean of the treatment arm and mu_c is the mean of the control arm. In the simulations the test arm is generated from a normal distribution with mean mu and the control arm from a normal distribution with mean 0, both with standard deviation sigma. Enter mu = 0 to verify type I error control and mu > 0 for the power simulation

sigma

Common standard deviation shared by the test and control arms; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

sampsz

Planned sample size: the planned sample size at the final analysis

N_max

Maximum sample size: a user chosen, maximum allowable sample size for sample size modification

theta_cut

Futility threshold: a cut-off for theta_hat. In the simulations, if theta_hat at the interim analysis is at or below theta_cut the trial is considered futile and proceeds to the planned sample size without any change

cp_min

Promising zone cp_min: CP_min in the promising zone sample size re-estimation; a conditional power below cp_min is the unfavorable zone. The user should select this value from Mehta, Pocock (2011)

gamma

Parameter chosen for the credible interval modified predictive power (CI_MPP); it defines the (1 - gamma) credible interval of the posterior for theta, e.g. gamma = 0.5 gives a 50 percent interval

alpha_2

Type I error for the two-sided test

beta

Conditional type II error; 1 - beta is the target conditional power used for the sample size re-estimation

sim_num

Number of simulation replicates

Value

A named list with the following components:

rejection rate and mean sample size

A data frame with the columns "Prior type", "SSR method", "Rejection rate" and "Mean sample size", with one row per sample size re-estimation (SSR) method. The methods compared are the planned sample size with no SSR, the promising zone SSR, the SSR using the true effect size with conditional power, and, for both the non-informative prior and the informative prior, the cp SSR, pp SSR, mpp SSR and ci_mpp SSR methods

futility rate

The rate at which the observed theta_hat at the interim analysis is at or below theta_cut, so that the trial proceeds without any sample size change

References

A data frame of the references for the methods compared

References

Gao, P. Improving the effectiveness of sample size re-estimation: an operating characteristic focused, hybrid frequentist-Bayesian approach, Statistics in Medicine, 2025; 44:e10310. To link to this article: https://onlinelibrary.wiley.com/doi/10.1002/sim.10310.

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

C. R. Mehta, S. J. Pocock. Adaptive increase in sample size when interim results are promising: A practical guide with examples. Statistics in Medicine. Volume30, Issue28, 10 December 2011, Pages 3267-3284

Examples

hybrid_fixed_prior_rej_normal_simu(t_prior = 5, theta_prior = 0.2, mu = 0, sigma = 1,
s = c(0.5,1), sampsz = 100, N_max = 150, theta_cut = 0.001, cp_min = 0.27, gamma = 0.5,
alpha_2 = 0.05, beta = 0.1, sim_num = 20)


Hybrid: Simulations, Poisson distribution, Using given estimates of informative prior

Description

Hybrid: Simulations, Poisson distribution, Using given estimates of informative prior

Usage

hybrid_fixed_prior_rej_poisson_simu(
  t_prior,
  theta_prior,
  lambda_t,
  lambda_c,
  s,
  sampsz,
  N_max,
  theta_cut,
  cp_min,
  gamma,
  alpha_2,
  beta,
  sim_num
)

Arguments

t_prior

Prior information time: the prior distribution of theta = lambda_t - lambda_c is assumed to have a normal distribution, and the Fisher's information time is the reciprocal of the variance of the prior distribution; set t_prior = 0 for a non-informative prior

theta_prior

Mean effect size of prior: the mean of the normal prior distribution of theta = lambda_t - lambda_c; set theta_prior = 0 for a non-informative prior

lambda_t

Event rate in the test arm of the current trial: the number of events per subject, generated as rpois(lambda_t). The effect size is theta = lambda_t - lambda_c. Enter lambda_t = lambda_c to verify type I error control and lambda_t > lambda_c for the power simulation

lambda_c

Event rate in the control arm of the current trial, generated as rpois(lambda_c); the effect size is theta = lambda_t - lambda_c

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

sampsz

Planned sample size: the planned sample size at the final analysis

N_max

Maximum sample size: a user chosen, maximum allowable sample size for sample size modification

theta_cut

Futility threshold: a cut-off for theta_hat. In the simulations, if theta_hat at the interim analysis is at or below theta_cut the trial is considered futile and proceeds to the planned sample size without any change

cp_min

Promising zone cp_min: CP_min in the promising zone sample size re-estimation; a conditional power below cp_min is the unfavorable zone. The user should select this value from Mehta, Pocock (2011)

gamma

Parameter chosen for the credible interval modified predictive power (CI_MPP); it defines the (1 - gamma) credible interval of the posterior for theta, e.g. gamma = 0.5 gives a 50 percent interval

alpha_2

Type I error for the two-sided test

beta

Conditional type II error; 1 - beta is the target conditional power used for the sample size re-estimation

sim_num

Number of simulation replicates

Value

A named list with the following components:

rejection rate and mean sample size

A data frame with the columns "Prior type", "SSR method", "Rejection rate" and "Mean sample size", with one row per sample size re-estimation (SSR) method. The methods compared are the planned sample size with no SSR, the promising zone SSR, the SSR using the true effect size with conditional power, and, for both the non-informative prior and the informative prior, the cp SSR, pp SSR, mpp SSR and ci_mpp SSR methods

futility rate

The rate at which the observed theta_hat at the interim analysis is at or below theta_cut, so that the trial proceeds without any sample size change

References

A data frame of the references for the methods compared

References

Gao, P. Improving the effectiveness of sample size re-estimation: an operating characteristic focused, hybrid frequentist-Bayesian approach, Statistics in Medicine, 2025; 44:e10310. To link to this article: https://onlinelibrary.wiley.com/doi/10.1002/sim.10310.

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

C. R. Mehta, S. J. Pocock. Adaptive increase in sample size when interim results are promising: A practical guide with examples. Statistics in Medicine. Volume30, Issue28, 10 December 2011, Pages 3267-3284

Examples

hybrid_fixed_prior_rej_poisson_simu(t_prior = 5, theta_prior = 0.2, lambda_t = 0.5,
lambda_c = 0.5, s = c(0.5,1), sampsz = 100, N_max = 150, theta_cut = 0.001, cp_min = 0.27,
gamma = 0.5, alpha_2 = 0.05, beta = 0.1, sim_num = 20)


Hybrid: Simulations, Survival analysis, Using given estimates of informative prior

Description

Hybrid: Simulations, Survival analysis, Using given estimates of informative prior

Usage

hybrid_fixed_prior_rej_survival_simu(
  t_prior,
  theta_prior,
  HR,
  lambda,
  s,
  alpha_2,
  surv_rate,
  evt_num,
  evt_max,
  HR_cut,
  cp_min,
  gamma,
  samp_multip,
  sim_num,
  beta
)

Arguments

t_prior

Prior information time: the prior distribution of theta = -log(HR) is assumed to have a normal distribution, and the Fisher's information time is the reciprocal of the variance of the prior distribution; set t_prior = 0 for a non-informative prior

theta_prior

Mean effect size of prior: the mean of the normal prior distribution of theta = -log(HR); set theta_prior = 0 for a non-informative prior

HR

Hazards ratio of test arm vs. the control arm. The effect size is theta = -log(HR) and a smaller HR indicates better efficacy. Enter HR = 1 to verify type I error control and HR < 1 for the power simulation

lambda

Baseline hazard rate of the control arm for the exponential survival times: the control arm is generated as rexp(lambda) and the test arm as rexp(HR * lambda), so lambda is a rate (not a log-hazard) and must be > 0. It also sets the censoring time T = -log(surv_rate)/lambda

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test

surv_rate

Survival rate used to translate the number of events into a sample size; it is the survival probability at the (administrative) censoring time T = -log(surv_rate)/lambda, 0 < surv_rate < 1

evt_num

Planned number of events: the planned number of events at the final analysis

evt_max

Maximum number of events: a user chosen, maximum allowable number of events for sample size modification

HR_cut

Futility hazards ratio threshold: a cut-off for HR_hat. In the simulations, if the estimated hazards ratio at the interim analysis is at or above HR_cut the trial is considered futile and proceeds to the planned number of events without any change; it is converted internally to theta_cut = -log(HR_cut)

cp_min

Promising zone cp_min: CP_min in the promising zone sample size re-estimation; a conditional power below cp_min is the unfavorable zone. The user should select this value from Mehta, Pocock (2011)

gamma

Parameter chosen for the credible interval modified predictive power (CI_MPP); it defines the (1 - gamma) credible interval of the posterior for theta, e.g. gamma = 0.5 gives a 50 percent interval

samp_multip

Multiplication factor applied when translating the maximum number of events into the sample size used in the simulations, sampsz = ceiling(samp_multip * evt_max / surv_rate); it must be large enough for the required number of events to be observed

sim_num

Number of simulation replicates

beta

Conditional type II error; 1 - beta is the target conditional power used for the sample size re-estimation

Value

A named list with the following components:

rejection rate and mean sample size

A data frame with the columns "Prior type", "SSR method", "Rejection rate" and "Mean sample size", with one row per sample size re-estimation (SSR) method. The methods compared are the planned sample size with no SSR, the promising zone SSR, the SSR using the true effect size with conditional power, and, for both the non-informative prior and the informative prior, the cp SSR, pp SSR, mpp SSR and ci_mpp SSR methods. For this survival design the mean sample size is the mean number of events

futility rate

The rate at which the estimated hazards ratio at the interim analysis is at or above HR_cut, so that the trial proceeds without any change to the number of events

References

A data frame of the references for the methods compared

References

Gao, P. Improving the effectiveness of sample size re-estimation: an operating characteristic focused, hybrid frequentist-Bayesian approach, Statistics in Medicine, 2025; 44:e10310. To link to this article: https://onlinelibrary.wiley.com/doi/10.1002/sim.10310.

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

C. R. Mehta, S. J. Pocock. Adaptive increase in sample size when interim results are promising: A practical guide with examples. Statistics in Medicine. Volume30, Issue28, 10 December 2011, Pages 3267-3284

Examples

hybrid_fixed_prior_rej_survival_simu(t_prior = 10, theta_prior = 0.8, HR = 1, lambda = 1,
s = c(0.5,1), alpha_2 = 0.05, surv_rate = 0.5, evt_num = 88, evt_max = 331, HR_cut = 0.95,
cp_min = 0.27, gamma = 0.5, samp_multip = 5, beta = 0.1, sim_num = 20)


Hybrid: Simulations, Binary distribution, Using random informative prior from previous trial

Description

Hybrid: Simulations, Binary distribution, Using random informative prior from previous trial

Usage

hybrid_random_prior_rej_binary_simu(
  p_t_0,
  p_c_0,
  sampsz_0,
  p_t,
  p_c,
  s,
  sampsz,
  N_max,
  theta_cut,
  cp_min,
  gamma,
  alpha_2,
  beta,
  sim_num
)

Arguments

p_t_0

Response rate (probability of response) in the test arm of the previous trial, p_t0; the previous-trial effect size is theta_0 = p_t_0 - p_c_0

p_c_0

Response rate (probability of response) in the control arm of the previous trial

sampsz_0

Sample size per arm from the previous trial, N_0; random samples of this size are drawn from the previous trial to form the random prior

p_t

Response rate (probability of response) in the test arm of the current trial; 0 < p_t < 1. The effect size is theta = p_t - p_c. Enter p_t = p_c to verify type I error control and p_t > p_c for the power simulation

p_c

Response rate (probability of response) in the control arm of the current trial; 0 < p_c < 1. The effect size is theta = p_t - p_c

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

sampsz

Planned sample size: the planned sample size at the final analysis

N_max

Maximum sample size: a user chosen, maximum allowable sample size for sample size modification

theta_cut

Futility threshold: a cut-off for theta_hat. In the simulations, if theta_hat at the interim analysis is at or below theta_cut the trial is considered futile and proceeds to the planned sample size without any change

cp_min

Promising zone cp_min: CP_min in the promising zone sample size re-estimation; a conditional power below cp_min is the unfavorable zone. The user should select this value from Mehta, Pocock (2011)

gamma

Parameter chosen for the credible interval modified predictive power (CI_MPP); it defines the (1 - gamma) credible interval of the posterior for theta, e.g. gamma = 0.5 gives a 50 percent interval

alpha_2

Type I error for the two-sided test

beta

Conditional type II error; 1 - beta is the target conditional power used for the sample size re-estimation

sim_num

Number of simulation replicates

Value

A named list with the following components:

rejection rate and mean sample size

A data frame with the columns "Prior type", "SSR method", "Rejection rate" and "Mean sample size", with one row per sample size re-estimation (SSR) method. The methods compared are the planned sample size with no SSR, the promising zone SSR, the SSR using the true effect size with conditional power, and, for both the non-informative prior and the informative prior, the cp SSR, pp SSR, mpp SSR and ci_mpp SSR methods

futility rate

The rate at which the observed theta_hat at the interim analysis is at or below theta_cut, so that the trial proceeds without any sample size change

References

A data frame of the references for the methods compared

References

Gao, P. Improving the effectiveness of sample size re-estimation: an operating characteristic focused, hybrid frequentist-Bayesian approach, Statistics in Medicine, 2025; 44:e10310. To link to this article: https://onlinelibrary.wiley.com/doi/10.1002/sim.10310.

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

C. R. Mehta, S. J. Pocock. Adaptive increase in sample size when interim results are promising: A practical guide with examples. Statistics in Medicine. Volume30, Issue28, 10 December 2011, Pages 3267-3284

Examples

hybrid_random_prior_rej_binary_simu(p_t_0 = 0.4, p_c_0 = 0.3, sampsz_0 = 60, p_t = 0.3,
p_c = 0.3, s = c(0.5,1), sampsz = 100, N_max = 150, theta_cut = 0.001, cp_min = 0.27,
gamma = 0.5, alpha_2 = 0.05, beta = 0.1, sim_num = 20)


Hybrid: Simulations, Negative binomial distribution, Using random informative prior from previous trial

Description

Hybrid: Simulations, Negative binomial distribution, Using random informative prior from previous trial

Usage

hybrid_random_prior_rej_negbinom_simu(
  r_t_0,
  r_c_0,
  sampsz_0,
  r_t,
  r_c,
  kappa,
  nu_t,
  rand_ratio,
  s,
  sampsz,
  N_max,
  theta_cut,
  cp_min,
  gamma,
  alpha_2,
  beta,
  sim_num
)

Arguments

r_t_0

Event rate in the test arm of the previous trial, r_t0; the previous-trial effect size is theta_0 = -log(r_t_0/r_c_0)

r_c_0

Event rate in the control arm of the previous trial, r_c0

sampsz_0

Sample size per arm from the previous trial, N_0; random samples of this size are drawn from the previous trial to form the random prior

r_t

Event rate in the test arm of the current trial; the effect size is theta = -log(r_t/r_c) and a smaller event rate is assumed to be associated with better efficacy. Enter r_t = r_c to verify type I error control and r_t < r_c for the power simulation

r_c

Event rate in the control arm of the current trial; the effect size is theta = -log(r_t/r_c)

kappa

Dispersion parameter of the negative binomial distribution; must be > 0

nu_t

Exposure time for the negative binomial distribution; must be > 0

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

sampsz

Planned sample size: the planned sample size at the final analysis

N_max

Maximum sample size: a user chosen, maximum allowable sample size for sample size modification

theta_cut

Futility threshold: a cut-off for theta_hat. In the simulations, if theta_hat at the interim analysis is at or below theta_cut the trial is considered futile and proceeds to the planned sample size without any change

cp_min

Promising zone cp_min: CP_min in the promising zone sample size re-estimation; a conditional power below cp_min is the unfavorable zone. The user should select this value from Mehta, Pocock (2011)

gamma

Parameter chosen for the credible interval modified predictive power (CI_MPP); it defines the (1 - gamma) credible interval of the posterior for theta, e.g. gamma = 0.5 gives a 50 percent interval

alpha_2

Type I error for the two-sided test

beta

Conditional type II error; 1 - beta is the target conditional power used for the sample size re-estimation

sim_num

Number of simulation replicates

Value

A named list with the following components:

rejection rate and mean sample size

A data frame with the columns "Prior type", "SSR method", "Rejection rate" and "Mean sample size", with one row per sample size re-estimation (SSR) method. The methods compared are the planned sample size with no SSR, the promising zone SSR, the SSR using the true effect size with conditional power, and, for both the non-informative prior and the informative prior, the cp SSR, pp SSR, mpp SSR and ci_mpp SSR methods

futility rate

The rate at which the observed theta_hat at the interim analysis is at or below theta_cut, so that the trial proceeds without any sample size change

References

A data frame of the references for the methods compared

References

Gao, P. Improving the effectiveness of sample size re-estimation: an operating characteristic focused, hybrid frequentist-Bayesian approach, Statistics in Medicine, 2025; 44:e10310. To link to this article: https://onlinelibrary.wiley.com/doi/10.1002/sim.10310.

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

C. R. Mehta, S. J. Pocock. Adaptive increase in sample size when interim results are promising: A practical guide with examples. Statistics in Medicine. Volume30, Issue28, 10 December 2011, Pages 3267-3284

Examples

hybrid_random_prior_rej_negbinom_simu(r_t_0 = 1.2, r_c_0 = 1, sampsz_0 = 50, r_t = 1, r_c = 1,
kappa = 1, nu_t = 1, rand_ratio = 1, s = c(0.5,1), sampsz = 100, N_max = 150,
theta_cut = 0.001, cp_min = 0.27, gamma = 0.5, alpha_2 = 0.05, beta = 0.1, sim_num = 20)


Hybrid: Simulations, Normal distribution, Using random informative prior from previous trial

Description

Hybrid: Simulations, Normal distribution, Using random informative prior from previous trial

Usage

hybrid_random_prior_rej_normal_simu(
  mu_0,
  sigma_0,
  sampsz_0,
  mu,
  sigma,
  s,
  sampsz,
  N_max,
  theta_cut,
  cp_min,
  gamma,
  alpha_2,
  beta,
  sim_num
)

Arguments

mu_0

Effect size (difference in means) of the previous trial: theta_0 = mu_t0 - mu_c0; in the simulations the previous-trial test arm is generated from a normal distribution with mean mu_0 and the previous-trial control arm from a normal distribution with mean 0, both with standard deviation sigma_0

sigma_0

Common standard deviation of the test and control arms in the previous trial; must be > 0

sampsz_0

Sample size per arm from the previous trial, N_0; random samples of this size are drawn from the previous trial to form the random prior

mu

Effect size (difference in means) of the current trial: theta = mu_t - mu_c, where mu_t is the mean of the treatment arm and mu_c is the mean of the control arm. In the simulations the test arm is generated from a normal distribution with mean mu and the control arm from a normal distribution with mean 0, both with standard deviation sigma. Enter mu = 0 to verify type I error control and mu > 0 for the power simulation

sigma

Common standard deviation shared by the test and control arms; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

sampsz

Planned sample size: the planned sample size at the final analysis

N_max

Maximum sample size: a user chosen, maximum allowable sample size for sample size modification

theta_cut

Futility threshold: a cut-off for theta_hat. In the simulations, if theta_hat at the interim analysis is at or below theta_cut the trial is considered futile and proceeds to the planned sample size without any change

cp_min

Promising zone cp_min: CP_min in the promising zone sample size re-estimation; a conditional power below cp_min is the unfavorable zone. The user should select this value from Mehta, Pocock (2011)

gamma

Parameter chosen for the credible interval modified predictive power (CI_MPP); it defines the (1 - gamma) credible interval of the posterior for theta, e.g. gamma = 0.5 gives a 50 percent interval

alpha_2

Type I error for the two-sided test

beta

Conditional type II error; 1 - beta is the target conditional power used for the sample size re-estimation

sim_num

Number of simulation replicates

Value

A named list with the following components:

rejection rate and mean sample size

A data frame with the columns "Prior type", "SSR method", "Rejection rate" and "Mean sample size", with one row per sample size re-estimation (SSR) method. The methods compared are the planned sample size with no SSR, the promising zone SSR, the SSR using the true effect size with conditional power, and, for both the non-informative prior and the informative prior, the cp SSR, pp SSR, mpp SSR and ci_mpp SSR methods

futility rate

The rate at which the observed theta_hat at the interim analysis is at or below theta_cut, so that the trial proceeds without any sample size change

References

A data frame of the references for the methods compared

References

Gao, P. Improving the effectiveness of sample size re-estimation: an operating characteristic focused, hybrid frequentist-Bayesian approach, Statistics in Medicine, 2025; 44:e10310. To link to this article: https://onlinelibrary.wiley.com/doi/10.1002/sim.10310.

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

C. R. Mehta, S. J. Pocock. Adaptive increase in sample size when interim results are promising: A practical guide with examples. Statistics in Medicine. Volume30, Issue28, 10 December 2011, Pages 3267-3284

Examples

hybrid_random_prior_rej_normal_simu(mu_0 = 0.3, sigma_0 = 1, sampsz_0 = 60, mu = 0, sigma = 1,
s = c(0.5,1), sampsz = 100, N_max = 250, theta_cut = 0.01, cp_min = 0.27, gamma = 0.5,
alpha_2 = 0.05, beta = 0.1, sim_num = 20)


Hybrid: Simulations, Poisson distribution, Using random informative prior from previous trial

Description

Hybrid: Simulations, Poisson distribution, Using random informative prior from previous trial

Usage

hybrid_random_prior_rej_poisson_simu(
  lambda_t_0,
  lambda_c_0,
  sampsz_0,
  lambda_t,
  lambda_c,
  s,
  sampsz,
  N_max,
  theta_cut,
  cp_min,
  gamma,
  alpha_2,
  beta,
  sim_num
)

Arguments

lambda_t_0

Event rate in the test arm of the previous trial, generated as rpois(lambda_t_0); the previous-trial effect size is theta_0 = lambda_t_0 - lambda_c_0

lambda_c_0

Event rate in the control arm of the previous trial, generated as rpois(lambda_c_0)

sampsz_0

Sample size per arm from the previous trial, N_0; random samples of this size are drawn from the previous trial to form the random prior

lambda_t

Event rate in the test arm of the current trial: the number of events per subject, generated as rpois(lambda_t). The effect size is theta = lambda_t - lambda_c. Enter lambda_t = lambda_c to verify type I error control and lambda_t > lambda_c for the power simulation

lambda_c

Event rate in the control arm of the current trial, generated as rpois(lambda_c); the effect size is theta = lambda_t - lambda_c

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

sampsz

Planned sample size: the planned sample size at the final analysis

N_max

Maximum sample size: a user chosen, maximum allowable sample size for sample size modification

theta_cut

Futility threshold: a cut-off for theta_hat. In the simulations, if theta_hat at the interim analysis is at or below theta_cut the trial is considered futile and proceeds to the planned sample size without any change

cp_min

Promising zone cp_min: CP_min in the promising zone sample size re-estimation; a conditional power below cp_min is the unfavorable zone. The user should select this value from Mehta, Pocock (2011)

gamma

Parameter chosen for the credible interval modified predictive power (CI_MPP); it defines the (1 - gamma) credible interval of the posterior for theta, e.g. gamma = 0.5 gives a 50 percent interval

alpha_2

Type I error for the two-sided test

beta

Conditional type II error; 1 - beta is the target conditional power used for the sample size re-estimation

sim_num

Number of simulation replicates

Value

A named list with the following components:

rejection rate and mean sample size

A data frame with the columns "Prior type", "SSR method", "Rejection rate" and "Mean sample size", with one row per sample size re-estimation (SSR) method. The methods compared are the planned sample size with no SSR, the promising zone SSR, the SSR using the true effect size with conditional power, and, for both the non-informative prior and the informative prior, the cp SSR, pp SSR, mpp SSR and ci_mpp SSR methods

futility rate

The rate at which the observed theta_hat at the interim analysis is at or below theta_cut, so that the trial proceeds without any sample size change

References

A data frame of the references for the methods compared

References

Gao, P. Improving the effectiveness of sample size re-estimation: an operating characteristic focused, hybrid frequentist-Bayesian approach, Statistics in Medicine, 2025; 44:e10310. To link to this article: https://onlinelibrary.wiley.com/doi/10.1002/sim.10310.

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

C. R. Mehta, S. J. Pocock. Adaptive increase in sample size when interim results are promising: A practical guide with examples. Statistics in Medicine. Volume30, Issue28, 10 December 2011, Pages 3267-3284

Examples

hybrid_random_prior_rej_poisson_simu(lambda_t_0 = 0.5, lambda_c_0 = 0.3, sampsz_0 = 60,
lambda_t = 0.5, lambda_c = 0.5, s = c(0.5,1), sampsz = 100, N_max = 150, theta_cut = 0.001,
cp_min = 0.27, gamma = 0.5, alpha_2 = 0.05, beta = 0.1, sim_num = 20)


Hybrid: Simulations, Survival analysis, Using random informative prior from previous trial

Description

Hybrid: Simulations, Survival analysis, Using random informative prior from previous trial

Usage

hybrid_random_prior_rej_survival_simu(
  HR_0,
  evt_num_0,
  HR,
  lambda,
  s,
  alpha_2,
  surv_rate,
  evt_num,
  evt_max,
  HR_cut,
  cp_min,
  gamma,
  samp_multip,
  sim_num,
  beta
)

Arguments

HR_0

Hazards ratio of test vs. control in the previous trial, HR_0; the previous-trial effect size is theta_0 = -log(HR_0)

evt_num_0

Number of events from the previous trial, N_0; random samples are drawn from the previous trial up to this number of events to form the random prior

HR

Hazards ratio of test arm vs. the control arm for the current trial. The effect size is theta = -log(HR) and a smaller HR indicates better efficacy. Enter HR = 1 to verify type I error control and HR < 1 for the power simulation

lambda

Baseline hazard rate of the control arm for the exponential survival times: the control arm is generated as rexp(lambda) and the test arm as rexp(HR * lambda), so lambda is a rate (not a log-hazard) and must be > 0. It also sets the censoring time T = -log(surv_rate)/lambda for both the previous and the current trial

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test

surv_rate

Survival rate used to translate the number of events into a sample size; it is the survival probability at the (administrative) censoring time T = -log(surv_rate)/lambda, 0 < surv_rate < 1

evt_num

Planned number of events: the planned number of events at the final analysis of the current trial

evt_max

Maximum number of events: a user chosen, maximum allowable number of events for sample size modification

HR_cut

Futility hazards ratio threshold: a cut-off for HR_hat. In the simulations, if the estimated hazards ratio at the interim analysis is at or above HR_cut the trial is considered futile and proceeds to the planned number of events without any change; it is converted internally to theta_cut = -log(HR_cut)

cp_min

Promising zone cp_min: CP_min in the promising zone sample size re-estimation; a conditional power below cp_min is the unfavorable zone. The user should select this value from Mehta, Pocock (2011)

gamma

Parameter chosen for the credible interval modified predictive power (CI_MPP); it defines the (1 - gamma) credible interval of the posterior for theta, e.g. gamma = 0.5 gives a 50 percent interval

samp_multip

Multiplication factor applied when translating the number of events of the previous and the current trial into sample sizes, for example sampsz = ceiling(samp_multip * evt_max / surv_rate); it must be large enough for the required number of events to be observed

sim_num

Number of simulation replicates

beta

Conditional type II error; 1 - beta is the target conditional power used for the sample size re-estimation

Value

A named list with the following components:

rejection rate and mean sample size

A data frame with the columns "Prior type", "SSR method", "Rejection rate" and "Mean sample size", with one row per sample size re-estimation (SSR) method. The methods compared are the planned sample size with no SSR, the promising zone SSR, the SSR using the true effect size with conditional power, and, for both the non-informative prior and the informative prior, the cp SSR, pp SSR, mpp SSR and ci_mpp SSR methods. For this survival design the mean sample size is the mean number of events

futility rate

The rate at which the estimated hazards ratio at the interim analysis is at or above HR_cut, so that the trial proceeds without any change to the number of events

References

A data frame of the references for the methods compared

References

Gao, P. Improving the effectiveness of sample size re-estimation: an operating characteristic focused, hybrid frequentist-Bayesian approach, Statistics in Medicine, 2025; 44:e10310. To link to this article: https://onlinelibrary.wiley.com/doi/10.1002/sim.10310.

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

C. R. Mehta, S. J. Pocock. Adaptive increase in sample size when interim results are promising: A practical guide with examples. Statistics in Medicine. Volume30, Issue28, 10 December 2011, Pages 3267-3284

Examples


hybrid_random_prior_rej_survival_simu(HR_0 = 0.63, evt_num_0 = 40, HR = 1, lambda = 1,
s = c(0.5,1), alpha_2 = 0.05, surv_rate = 0.5, evt_num = 88, evt_max = 331, HR_cut = 0.95,
cp_min = 0.27, gamma = 0.5, samp_multip = 5, beta = 0.1, sim_num = 20)



Single arm phase 2 oncology trial: Two-stage design, the hybrid design

Description

Single arm phase 2 oncology trial: Two-stage design, the hybrid design

Usage

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

Arguments

alpha

Type I error for the one-sided test

beta

Type II error rate, i.e. 1 - power

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

Sets the minimal difference between n_2 and n_1 for the design; min(n_2 - n_1)

Value

A named list with the following components:

Simon's design: p=p_1

A matrix with one row per design (minimax, optimal and average) for Simon's design using p_1 as the target response rate, with columns r1, n1, r_2, n_2, EN(p0) (expected sample size under p_0), PET(p0) (probability of early termination under p_0), t1_err, PET_p (PET under p_1), PET_p_low (PET under p_low), power_p (power under p_1) and power_p_low (power under p_low)

Simon's design: p=p_low

The corresponding matrix for Simon's design using p_low as the target response rate

Hybrid design

A matrix with one row per design (minimax, optimal and average) and columns n_1, r_1, r_1_e (the trial is stopped for superiority if at least r_1_e responses are observed at the first look), r_2, n_2, t1_err, power (power under p_1), PET_p1, PET_p_low, PET_p0, En_p0 (expected sample size under p_0) and PW_p_low (power under p_low)

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)


Single arm phase 2 oncology trial: The interim analysis can be conducted for both two-stage and three-stage designs

Description

Single arm phase 2 oncology trial: 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

Rejection threshold of the original design in terms of the number of responses: r_final = r_2 for a two-stage design and r_final = r_3 for a three-stage design

n_inter

Number of patients at the interim look: n_inter = n_1 for a two-stage design and n_inter = n_2 for a three-stage design

n_final

Number of patients at the final look: n_final = n_2 for a two-stage design and n_final = n_3 for a three-stage design; must be greater than n_inter

x_inter

Number of responses observed at the interim look

beta

Conditional type II error rate: 1 - beta is the desired conditional power, which drives the re-estimated sample size

N_max

Pre-selected maximum sample size for the trial; the new sample size is truncated at N_max

Value

A named list with the following components:

new sample size

Re-estimated total sample size N_new, obtained by converting the required information time into a number of patients and truncating at N_max

new discrete rejection boundary without continuity correction

Threshold r_new such that the null hypothesis is rejected at the new sample size if at least r_new responses are observed; no continuity correction

new discrete rejection boundary with continuity correction

The same rejection threshold computed with the 0.5 continuity correction applied to the response count

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)


Multiple comparisons Group sequential design: Final analysis, With one sample size change, orgin_comp==comp2

Description

Multiple comparisons Group sequential design: Final analysis, With one sample size change, orgin_comp==comp2

Usage

masd_est_back_no_drop(
  s,
  c_bry,
  snew,
  c_bry_new,
  theta_hat_inter_m1,
  theta_hat_inter_m1_sd,
  inter_vt,
  theta_hat_last_ad_m1,
  theta_hat_last_ad_m1_sd,
  last_vt_ad,
  alpha_2,
  dist
)

Arguments

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

c_bry

Vector of critical boundaries for each analysis

snew

Vector of new information fractions after the sample size is changed, e.g. c(0.5, 1); the fractions are relative to the new total information and the last element must be 1

c_bry_new

Vector of new critical boundaries after the sample size is changed, one per element of 'snew'

theta_hat_inter_m1

Numeric vector of treatment effect estimates observed at the interim analysis at which the sample size was changed, one per original comparison (dose), e.g. the difference of the observed means or event rates between a test arm and the common control arm

theta_hat_inter_m1_sd

Standard error of 'theta_hat_inter_m1'; either a single value shared by all comparisons or a vector with one value per comparison; must be > 0

inter_vt

Index of the interim analysis at which the sample size was changed (1-based); must be less than length(s)

theta_hat_last_ad_m1

Numeric vector of treatment effect estimates observed at the analysis after the sample size change at which the trial was terminated, one per original comparison (dose), so that no doses were dropped; the comparison with the largest estimate is the one for which the point estimate and confidence interval are returned

theta_hat_last_ad_m1_sd

Standard error of 'theta_hat_last_ad_m1'; either a single value shared by all comparisons or a vector with one value per comparison; must be > 0

last_vt_ad

Index of the interim or final analysis after the sample size change at which the trial was terminated (1-based); it indexes 'snew'

alpha_2

Type I error for the two-sided test

dist

Distribution indicator: 1 = the comparisons (doses) share one common control arm and the endpoint is normally distributed, so that the treatment effect estimates are correlated with correlation 1/2; otherwise the comparisons are treated as independent

Value

A named list with the following components:

p-value

The p-value of the test of the null hypothesis that the treatment effect of the comparison (dose) with the best efficacy is 0

confidence interval

Numeric vector of length 3 giving the lower confidence limit, the conservatively median unbiased point estimate and the upper confidence limit for the comparison (dose) with the best efficacy; this is the two-sided (1 - alpha_2) * 100 percent confidence interval, and its lower limit is consistent with the p-value, in the sense that the p-value < alpha_2/2 if and only if the lower limit is greater than 0

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

masd_est_back_no_drop(s = c(0.3,0.7,1), c_bry = c(4.347011, 2.845787, 2.380956), snew = c(0.5,1),
c_bry_new = c(3.310743,2.781890), theta_hat_inter_m1 = c(1.2,1.3,1.5), theta_hat_inter_m1_sd = 1,
inter_vt = 1, theta_hat_last_ad_m1 = c(2.2,1.4,1.8), theta_hat_last_ad_m1_sd = 1,
last_vt_ad = 2, alpha_2 = 0.05, dist = 1)


Multiple comparisons Group sequential design: Final analysis, With one sample size change, orgin_comp>comp2

Description

Multiple comparisons Group sequential design: Final analysis, With one sample size change, orgin_comp>comp2

Usage

masd_est_back_with_drop(
  s,
  c_bry,
  snew,
  c_bry_new,
  theta_hat_inter_m1,
  theta_hat_inter_m1_sd,
  theta_hat_inter_m2,
  theta_hat_inter_m2_sd,
  inter_vt,
  theta_hat_last_ad_m2,
  theta_hat_last_ad_m2_sd,
  last_vt_ad,
  alpha_2,
  dist
)

Arguments

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

c_bry

Vector of critical boundaries for each analysis

snew

Vector of new information fractions after the sample size is changed, e.g. c(0.5, 1); the fractions are relative to the new total information and the last element must be 1

c_bry_new

Vector of new critical boundaries after the sample size is changed, one per element of 'snew'

theta_hat_inter_m1

Numeric vector of treatment effect estimates observed at the interim analysis at which the sample size was changed, one per original comparison (dose), e.g. the difference of the observed means or event rates between a test arm and the common control arm

theta_hat_inter_m1_sd

Standard error of 'theta_hat_inter_m1'; either a single value shared by all comparisons or a vector with one value per comparison; must be > 0

theta_hat_inter_m2

Numeric vector of treatment effect estimates at the interim analysis for the M^(2) comparisons that remain after the doses (comparisons) dropped for lack of efficacy are removed; each element must appear in 'theta_hat_inter_m1', which is used to map the remaining comparisons back onto the original ones

theta_hat_inter_m2_sd

Standard error of 'theta_hat_inter_m2'; either a single value shared by all comparisons or a vector with one value per comparison; must be > 0

inter_vt

Index of the interim analysis at which the sample size was changed (1-based); must be less than length(s)

theta_hat_last_ad_m2

Numeric vector of treatment effect estimates observed at the analysis after the sample size change at which the trial was terminated, one per remaining comparison (dose); the remaining comparison with the largest estimate is the one for which the point estimate and confidence interval are returned

theta_hat_last_ad_m2_sd

Standard error of 'theta_hat_last_ad_m2'; either a single value shared by all comparisons or a vector with one value per comparison; must be > 0

last_vt_ad

Index of the interim or final analysis after the sample size change at which the trial was terminated (1-based); it indexes 'snew'

alpha_2

Type I error for the two-sided test

dist

Distribution indicator: 1 = the comparisons (doses) share one common control arm and the endpoint is normally distributed, so that the treatment effect estimates are correlated with correlation 1/2; otherwise the comparisons are treated as independent

Value

A named list with the following components:

p-value

The p-value of the test of the null hypothesis that the treatment effect of the remaining comparison (dose) with the best efficacy is 0

confidence interval

Numeric vector of length 3 giving the lower confidence limit, the conservatively median unbiased point estimate and the upper confidence limit for the remaining comparison (dose) with the best efficacy; this is the two-sided (1 - alpha_2) * 100 percent confidence interval, and its lower limit is consistent with the p-value, in the sense that the p-value < alpha_2/2 if and only if the lower limit is greater than 0

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

masd_est_back_with_drop(s = c(0.3,0.7,1), c_bry = c(4.347011,2.845787,2.380956), snew = c(0.5,1),
c_bry_new = c(3.310743,2.781890), theta_hat_inter_m1 = c(1.2,1.3,1.5), theta_hat_inter_m1_sd = 1,
theta_hat_inter_m2 = c(1.3,1.5), theta_hat_inter_m2_sd = 1, inter_vt = 1,
theta_hat_last_ad_m2 = c(2.2,1.4), theta_hat_last_ad_m2_sd = 1, last_vt_ad = 2,
alpha_2 = 0.05, dist = 1)


Multiple comparisons Group sequential design: Final analysis, Without sample size change

Description

Multiple comparisons Group sequential design: Final analysis, Without sample size change

Usage

masd_est_ci(
  s,
  c_bry,
  theta_hat_last_m1,
  theta_hat_last_m1_sd,
  last_vt,
  alpha_2,
  dist
)

Arguments

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

c_bry

Vector of critical boundaries for each analysis

theta_hat_last_m1

Numeric vector of treatment effect estimates observed at the analysis at which the trial stopped, one per comparison (dose), e.g. the difference of the observed means or event rates between a test arm and the common control arm, or minus the log of the observed hazard ratio; its length gives the number of comparisons

theta_hat_last_m1_sd

Standard error of 'theta_hat_last_m1'; either a single value shared by all comparisons or a vector with one value per comparison; must be > 0

last_vt

Index of the analysis at which the trial stopped (1-based); this can be the final analysis, at which s = 1, or an interim analysis, and it must not exceed length(s)

alpha_2

Type I error for the two-sided test

dist

Distribution indicator: 1 = the comparisons (doses) share one common control arm and the endpoint is normally distributed, so that the treatment effect estimates are correlated with correlation 1/2; otherwise the comparisons are treated as independent

Value

A named list with the following components:

p-value

The p-value of the test of the null hypothesis that the treatment effect of the dose (comparison) with the best efficacy is 0

confidence interval

Numeric vector of length 3 giving the lower confidence limit, the conservatively median unbiased point estimate and the upper confidence limit for the dose (comparison) with the best efficacy; the lower limit is consistent with the p-value, in the sense that the p-value < alpha_2/2 if and only if the lower limit is greater than 0

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

masd_est_ci(s = c(1/3, 2/3, 1), c_bry = c(3.984298, 3.961146, 2.349682),
theta_hat_last_m1 = 0.35, theta_hat_last_m1_sd = 0.6,
last_vt = 1, alpha_2 = 0.05, dist = 1)


Multiple comparisons Group sequential design: Interim analysis, Non-survival analysis, Use theta_interim

Description

Multiple comparisons Group sequential design: Interim analysis, Non-survival analysis, Use theta_interim

Usage

masd_new_samsz(
  s,
  c_bry,
  snew,
  inter_vt,
  theta_hat_inter_m1,
  theta_hat_inter_m1_sd,
  theta_hat_inter_m2,
  theta_hat_inter_m2_sd,
  beta,
  n_control_inter,
  dist
)

Arguments

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

c_bry

Vector of critical boundaries for each analysis

snew

Vector of new information fractions after the sample size is changed, e.g. c(0.5, 1); the fractions are relative to the new total information and the last element must be 1

inter_vt

Index of the interim analysis at which the sample size is re-estimated (1-based); must be less than length(s)

theta_hat_inter_m1

Numeric vector of treatment effect estimates observed at the interim analysis for all M^(1) comparisons, e.g. the difference of the observed means or event rates between a test arm and the common control arm, or minus the log of the observed hazard ratio; it is also used as the estimated effect size for the conditional power calculation

theta_hat_inter_m1_sd

Standard error of 'theta_hat_inter_m1'; must be > 0

theta_hat_inter_m2

Numeric vector of treatment effect estimates at the interim analysis for the M^(2) comparisons that remain after the comparisons (doses) dropped for lack of efficacy are removed; each element must appear in 'theta_hat_inter_m1', which is used to map the remaining comparisons back onto the original ones

theta_hat_inter_m2_sd

Standard error of 'theta_hat_inter_m2'; must be > 0

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation

n_control_inter

Sample size of the control arm at the interim analysis

dist

Distribution indicator: 1 = the comparisons (doses) share one common control arm and the endpoint is normally distributed, so that the treatment effect estimates are correlated with correlation 1/2; otherwise the comparisons are treated as independent

Value

A named list with the following components:

Interim analysis hypothesis test

Character string giving the outcome of the interim hypothesis test: whether the null hypothesis was rejected at the interim analysis, which is the case if the largest Wald statistic reaches the planned critical boundary

Wald statistics

Numeric vector of the Wald statistics of the treatment effects observed at the interim analysis, one per original (M^(1)) comparison

Critical boundary

Planned critical boundary at the interim analysis at which the sample size is re-estimated

Estimated effect size: theta

The effect size used for the conditional power calculation, taken to be the treatment effect estimates observed at the interim analysis, one value per original (M^(1)) comparison

remaining effect size

The elements of the estimated effect size belonging to the M^(2) comparisons that remain after the doses (comparisons) are dropped

c_alpha

Conditional type I error at the interim analysis, calculated by setting theta = 0 for all comparisons

c_power_m1

Conditional power at the interim analysis using all M^(1) comparisons, the estimated effect size and the original critical boundaries

c_power_m2

Conditional power for the remaining M^(2) comparisons using the new critical boundary evaluated at the planned sample size (ratio of new to original sample size 1), or 'NA' if the null hypothesis was rejected at the interim analysis or if the largest observed effect estimate is < 0.001

N_control_new

New sample size for the control arm after the sample size re-estimation, or 'NA' if the null hypothesis was rejected at the interim analysis or if the largest observed effect estimate is < 0.001

new information fraction

The new information fractions after the sample size change, i.e. 'snew'

New critical boundary

Numeric vector of the new critical boundaries for the new interim analyses (O'Brien-Fleming type), one per element of 'snew', or 'NA' if they were not calculated

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

masd_new_samsz( s = c(1/3,2/3,1), c_bry = c(3.984298, 3.961146, 2.349682), snew = 1,
  inter_vt = 2, theta_hat_inter_m1 = c(0.2,0.5,0.8), theta_hat_inter_m1_sd = 0.5,
  theta_hat_inter_m2 = c(0.5,0.8), theta_hat_inter_m2_sd = 0.2, beta = 0.1,
  n_control_inter = 65, dist = 1)


Multiple comparisons Group sequential design: Interim analysis, Survival analysis, Use theta_interim

Description

Multiple comparisons Group sequential design: Interim analysis, Survival analysis, Use theta_interim

Usage

masd_new_samsz_survival(
  s,
  c_bry,
  snew,
  inter_vt,
  theta_hat_inter_m1,
  theta_hat_inter_m1_sd,
  theta_hat_inter_m2,
  theta_hat_inter_m2_sd,
  beta,
  tot_events_inter_m1,
  dist
)

Arguments

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

c_bry

Vector of critical boundaries for each analysis

snew

Vector of new information fractions after the sample size is changed, e.g. c(0.5, 1); the fractions are relative to the new total information and the last element must be 1

inter_vt

Index of the interim analysis at which the sample size is re-estimated (1-based); must be less than length(s)

theta_hat_inter_m1

Numeric vector of treatment effect estimates observed at the interim analysis for all M^(1) comparisons, i.e. minus the log of the observed hazard ratio for each comparison; it is also used as the estimated effect size for the conditional power calculation

theta_hat_inter_m1_sd

Standard error of 'theta_hat_inter_m1'; must be > 0

theta_hat_inter_m2

Numeric vector of treatment effect estimates at the interim analysis for the M^(2) comparisons that remain after the comparisons (doses) dropped for lack of efficacy are removed; each element must appear in 'theta_hat_inter_m1', which is used to map the remaining comparisons back onto the original ones

theta_hat_inter_m2_sd

Standard error of 'theta_hat_inter_m2'; must be > 0

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation

tot_events_inter_m1

Total number of events observed at the interim analysis across all M^(1) test arms and the common control arm

dist

Distribution indicator: 1 = the comparisons (doses) share one common control arm and the endpoint is normally distributed, so that the treatment effect estimates are correlated with correlation 1/2; otherwise the comparisons are treated as independent

Value

A named list with the following components:

Interim analysis hypothesis test

Character string giving the outcome of the interim hypothesis test: whether the null hypothesis was rejected at the interim analysis, which is the case if the largest Wald statistic reaches the planned critical boundary

Wald statistics

Numeric vector of the Wald statistics of the treatment effects observed at the interim analysis, one per original (M^(1)) comparison

Critical boundary

Planned critical boundary at the interim analysis at which the sample size is re-estimated

Assumed effect size: theta

The effect size used for the conditional power calculation, taken to be the treatment effect estimates observed at the interim analysis (minus the log of the observed hazard ratio), one value per original (M^(1)) comparison

remaining effect size

The elements of the effect size belonging to the M^(2) comparisons that remain after the doses (comparisons) are dropped

c_alpha

Conditional type I error at the interim analysis, calculated by setting theta = 0 for all comparisons

c_power_m1

Conditional power at the interim analysis using all M^(1) comparisons, the observed effect size and the original critical boundaries

c_power_m2

Conditional power for the remaining M^(2) comparisons using the new critical boundary evaluated at the planned sample size (ratio of new to original sample size 1), or 'NA' if the null hypothesis was rejected at the interim analysis or if max(theta) < 0.001

new events between a test arm and control

Number of events between one test arm and the common control arm required after the sample size re-estimation, derived from the interim total events and the ratio of the new to the planned information, or 'NA' if the null hypothesis was rejected at the interim analysis or if max(theta) < 0.001

new total events

New total number of events after the sample size re-estimation, across the M^(2) remaining test arms and the common control arm, or 'NA' if the null hypothesis was rejected at the interim analysis or if max(theta) < 0.001

new information fraction

The new information fractions after the sample size change, i.e. 'snew'

New critical boundary

Numeric vector of the new critical boundaries for the new interim analyses (O'Brien-Fleming type), one per element of 'snew', or 'NA' if they were not calculated

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

masd_new_samsz_survival(s = c(1/3,2/3,1), c_bry = c(3.984298, 3.961146, 2.349682), snew = 1,
inter_vt = 2, theta_hat_inter_m1 = c(1.2,1.5,1.1),
theta_hat_inter_m1_sd = 1.2, theta_hat_inter_m2 = c(1.2,1.5),
theta_hat_inter_m2_sd = 1.2, beta = 0.1, tot_events_inter_m1 = 65, dist = 1)


Multiple comparisons Group sequential design: Interim analysis, Non-survival analysis, Input theta

Description

Multiple comparisons Group sequential design: Interim analysis, Non-survival analysis, Input theta

Usage

masd_new_samsz_theta(
  theta,
  s,
  c_bry,
  snew,
  inter_vt,
  theta_hat_inter_m1,
  theta_hat_inter_m1_sd,
  theta_hat_inter_m2,
  theta_hat_inter_m2_sd,
  beta,
  n_control_inter,
  dist
)

Arguments

theta

Assumed effect size for each of the M^(1) comparisons, i.e. a vector with length(theta) = length(theta_hat_inter_m1); different values can be entered to check the sensitivity of the conditional power to the effect size

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

c_bry

Vector of critical boundaries for each analysis

snew

Vector of new information fractions after the sample size is changed, e.g. c(0.5, 1); the fractions are relative to the new total information and the last element must be 1

inter_vt

Index of the interim analysis at which the sample size is re-estimated (1-based); must be less than length(s)

theta_hat_inter_m1

Numeric vector of treatment effect estimates observed at the interim analysis for all M^(1) comparisons, e.g. the difference of the observed means or event rates between a test arm and the common control arm, or minus the log of the observed hazard ratio

theta_hat_inter_m1_sd

Standard error of 'theta_hat_inter_m1'; must be > 0

theta_hat_inter_m2

Numeric vector of treatment effect estimates at the interim analysis for the M^(2) comparisons that remain after the comparisons (doses) dropped for lack of efficacy are removed; each element must appear in 'theta_hat_inter_m1', which is used to map the remaining comparisons back onto the original ones

theta_hat_inter_m2_sd

Standard error of 'theta_hat_inter_m2'; must be > 0

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation

n_control_inter

Sample size of the control arm at the interim analysis

dist

Distribution indicator: 1 = the comparisons (doses) share one common control arm and the endpoint is normally distributed, so that the treatment effect estimates are correlated with correlation 1/2; otherwise the comparisons are treated as independent

Value

A named list with the following components:

Interim analysis hypothesis test

Character string giving the outcome of the interim hypothesis test: whether the null hypothesis was rejected at the interim analysis, which is the case if the largest Wald statistic reaches the planned critical boundary

Wald statistics

Numeric vector of the Wald statistics of the treatment effects observed at the interim analysis, one per original (M^(1)) comparison

Critical boundary

Planned critical boundary at the interim analysis at which the sample size is re-estimated

Assumed effect size: theta

The assumed effect size theta entered by the user, one value per original (M^(1)) comparison

remaining effect size

The elements of the assumed effect size belonging to the M^(2) comparisons that remain after the doses (comparisons) are dropped

c_alpha

Conditional type I error at the interim analysis, calculated by setting theta = 0 for all comparisons

c_power_m1

Conditional power at the interim analysis using all M^(1) comparisons, the assumed effect size theta and the original critical boundaries

c_power_m2

Conditional power for the remaining M^(2) comparisons using the new critical boundary evaluated at the planned sample size (ratio of new to original sample size 1), or 'NA' if the null hypothesis was rejected at the interim analysis or if max(theta) < 0.001

N_control_new

New sample size for the control arm after the sample size re-estimation, or 'NA' if the null hypothesis was rejected at the interim analysis or if max(theta) < 0.001

new information fraction

The new information fractions after the sample size change, i.e. 'snew'

New critical boundary

Numeric vector of the new critical boundaries for the new interim analyses (O'Brien-Fleming type), one per element of 'snew', or 'NA' if they were not calculated

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

masd_new_samsz_theta( theta = c(0,0.2,0), s = c(1/3,2/3,1),
  c_bry = c(3.984298, 3.961146, 2.349682), snew = 1, inter_vt = 2,
  theta_hat_inter_m1 = c(0.2,0.5,0.8), theta_hat_inter_m1_sd = 0.5,
  theta_hat_inter_m2 = c(0.5,0.8), theta_hat_inter_m2_sd = 0.2, beta = 0.1,
  n_control_inter = 65, dist = 1)


Multiple comparisons Group sequential design: Interim analysis, Survival analysis, Input theta

Description

Multiple comparisons Group sequential design: Interim analysis, Survival analysis, Input theta

Usage

masd_new_samsz_theta_survival(
  theta,
  s,
  c_bry,
  snew,
  inter_vt,
  theta_hat_inter_m1,
  theta_hat_inter_m1_sd,
  theta_hat_inter_m2,
  theta_hat_inter_m2_sd,
  beta,
  tot_events_inter_m1,
  dist
)

Arguments

theta

Assumed effect size (minus the log of the hazard ratio) for each of the M^(1) comparisons, i.e. a vector with length(theta) = length(theta_hat_inter_m1); different values can be entered to check the sensitivity of the conditional power to the effect size

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

c_bry

Vector of critical boundaries for each analysis

snew

Vector of new information fractions after the sample size is changed, e.g. c(0.5, 1); the fractions are relative to the new total information and the last element must be 1

inter_vt

Index of the interim analysis at which the sample size is re-estimated (1-based); must be less than length(s)

theta_hat_inter_m1

Numeric vector of treatment effect estimates observed at the interim analysis for all M^(1) comparisons, i.e. minus the log of the observed hazard ratio for each comparison

theta_hat_inter_m1_sd

Standard error of 'theta_hat_inter_m1'; must be > 0

theta_hat_inter_m2

Numeric vector of treatment effect estimates at the interim analysis for the M^(2) comparisons that remain after the comparisons (doses) dropped for lack of efficacy are removed; each element must appear in 'theta_hat_inter_m1', which is used to map the remaining comparisons back onto the original ones

theta_hat_inter_m2_sd

Standard error of 'theta_hat_inter_m2'; must be > 0

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation

tot_events_inter_m1

Total number of events observed at the interim analysis across all M^(1) test arms and the common control arm

dist

Distribution indicator: 1 = the comparisons (doses) share one common control arm and the endpoint is normally distributed, so that the treatment effect estimates are correlated with correlation 1/2; otherwise the comparisons are treated as independent

Value

A named list with the following components:

Interim analysis hypothesis test

Character string giving the outcome of the interim hypothesis test: whether the null hypothesis was rejected at the interim analysis, which is the case if the largest Wald statistic reaches the planned critical boundary

Wald statistics

Numeric vector of the Wald statistics of the treatment effects observed at the interim analysis, one per original (M^(1)) comparison

Critical boundary

Planned critical boundary at the interim analysis at which the sample size is re-estimated

Assumed effect size: theta

The assumed effect size theta entered by the user, one value per original (M^(1)) comparison

remaining effect size

The elements of the assumed effect size belonging to the M^(2) comparisons that remain after the doses (comparisons) are dropped

c_alpha

Conditional type I error at the interim analysis, calculated by setting theta = 0 for all comparisons

c_power_m1

Conditional power at the interim analysis using all M^(1) comparisons, the assumed effect size theta and the original critical boundaries

c_power_m2

Conditional power for the remaining M^(2) comparisons using the new critical boundary evaluated at the planned sample size (ratio of new to original sample size 1), or 'NA' if the null hypothesis was rejected at the interim analysis or if max(theta) < 0.001

new events between a test arm and control

Number of events between one test arm and the common control arm available for the re-estimation, calculated from the interim total events as 2 * tot_events_inter_m1 / (M^(1) + 1), or 'NA' if the null hypothesis was rejected at the interim analysis or if max(theta) < 0.001

new total events

New total number of events after the sample size re-estimation, across the M^(2) remaining test arms and the common control arm, or 'NA' if the null hypothesis was rejected at the interim analysis or if max(theta) < 0.001

new information fraction

The new information fractions after the sample size change, i.e. 'snew'

New critical boundary

Numeric vector of the new critical boundaries for the new interim analyses (O'Brien-Fleming type), one per element of 'snew', or 'NA' if they were not calculated

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

masd_new_samsz_theta_survival( theta = c(0,0.2,0), s = c(1/3,2/3,1),
  c_bry = c(3.984298, 3.961146, 2.349682), snew = 1, inter_vt = 2,
  theta_hat_inter_m1 = c(1.2,1.5,1.1), theta_hat_inter_m1_sd = 1.2,
  theta_hat_inter_m2 = c(1.2,1.5), theta_hat_inter_m2_sd = 1.2, beta = 0.1,
  tot_events_inter_m1 = 65, dist = 1)


Multiple comparisons Group sequential design: Simulations, Binary distribution, Operating characteristics

Description

Multiple comparisons Group sequential design: Simulations, Binary distribution, Operating characteristics

Usage

masd_power_simu_adapt_binary(
  p_t,
  p_c,
  direction,
  s,
  bry_type,
  alpha_2,
  theta_cut,
  beta,
  samsz,
  N_max,
  sim_num
)

Arguments

p_t

Vector of true event rates of the test arms, one per dose; 0 < p_t < 1

p_c

Event rate of the control arm; 0 < p_c < 1

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = alpha-spending

alpha_2

Type I error for the two-sided test; when bry_type = 2 this is instead the vector of two-sided type I error levels spent at each look, which must sum to the total two-sided type I error

theta_cut

Lack-of-efficacy threshold on the effect-size scale: a test arm is dropped at the interim analysis when its observed effect size is below this value

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; 0 < beta < 1

samsz

Sample size of the control arm used in the simulation; must be > 0

N_max

Maximum sample size for the control arm allowed by the sample size re-estimation; must be >= samsz

sim_num

Number of simulation replicates

Value

A named list with the following components:

Design

Matrix with one row per look giving the look number, the information fraction, the critical boundary, the rejection rate by look and the rate of sample size increase

Summary by arm

Matrix with one row per test arm giving the test-arm event rate, the control-arm event rate, the drop rate by arm and the rejection rate by arm

simulation results

Named numeric vector holding the rejection rate without and with sample size re-estimation, the rate of sample size increase, the rejection rates conditional on meeting the sample size increase criteria, the simulated type I error rate, the non-type I error rejection rate, the futility rate, the planned and maximum control sample sizes, the mean simulated control sample size and the mean simulated control sample size conditional on an increase

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


masd_power_simu_adapt_binary(p_t = c(0.4,0.4,0.4), p_c = 0.4, direction = 1, s = c(1/3,2/3,1),
bry_type = 1, alpha_2 = 0.05, theta_cut = 0.01, beta = 0.1, samsz = 100,
N_max = 200, sim_num = 20)



Multiple comparisons Group sequential design: Simulations, Negative binomial distribution, Operating characteristics

Description

Multiple comparisons Group sequential design: Simulations, Negative binomial distribution, Operating characteristics

Usage

masd_power_simu_adapt_neg_binomial(
  r_t,
  r_c,
  kappa,
  direction,
  s,
  bry_type,
  alpha_2,
  beta,
  theta_cut,
  samsz,
  N_max,
  sim_num
)

Arguments

r_t

Vector of true mean rates of the test arms, one per dose; must be > 0

r_c

Mean rate of the control arm; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

direction

Test direction: 1 = larger r is better, otherwise smaller r is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = alpha-spending

alpha_2

Type I error for the two-sided test; when bry_type = 2 this is instead the vector of two-sided type I error levels spent at each look, which must sum to the total two-sided type I error

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; 0 < beta < 1

theta_cut

Lack-of-efficacy threshold on the effect-size scale: a test arm is dropped at the interim analysis when its observed effect size is below this value

samsz

Sample size of the control arm used in the simulation; must be > 0

N_max

Maximum sample size for the control arm allowed by the sample size re-estimation; must be >= samsz

sim_num

Number of simulation replicates

Value

A named list with the following components:

Design

Matrix with one row per look giving the look number, the information fraction, the critical boundary, the rejection rate by look and the rate of sample size increase

Summary by arm

Matrix with one row per test arm giving the test-arm mean rate, the control-arm mean rate, the drop rate by arm and the rejection rate by arm

simulation results

Named numeric vector holding the rejection rate without and with sample size re-estimation, the rate of sample size increase, the rejection rates conditional on meeting the sample size increase criteria, the simulated type I error rate, the non-type I error rejection rate, the futility rate, the planned and maximum control sample sizes, the mean simulated control sample size and the mean simulated control sample size conditional on an increase

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


masd_power_simu_adapt_neg_binomial(r_t = c(1.1,1.1,1.1), r_c = 1.1, kappa = 1, direction = 1,
s = c(1/3,2/3,1), bry_type = 1, alpha_2 = 0.05, beta = 0.1, theta_cut = 0.01, samsz = 100,
N_max = 500, sim_num = 20)



Multiple comparisons Group sequential design: Simulations, Normal distribution, Operating characteristics

Description

Multiple comparisons Group sequential design: Simulations, Normal distribution, Operating characteristics

Usage

masd_power_simu_adapt_normal(
  mu_t,
  mu_c,
  sigma_t,
  sigma_c,
  direction,
  s,
  bry_type,
  alpha_2,
  beta,
  theta_cut,
  samsz,
  N_max,
  sim_num
)

Arguments

mu_t

Vector of true means of the test arms, one per dose; setting mu_t = mu_c gives the simulated type I error rate

mu_c

Mean of the control arm

sigma_t

Standard deviation of the test arm; must be > 0

sigma_c

Standard deviation of the control arm; must be > 0

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = alpha-spending

alpha_2

Type I error for the two-sided test; when bry_type = 2 this is instead the vector of two-sided type I error levels spent at each look, which must sum to the total two-sided type I error

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; 0 < beta < 1

theta_cut

Lack-of-efficacy threshold on the effect-size scale: a test arm is dropped at the interim analysis when its observed effect size is below this value

samsz

Sample size of the control arm used in the simulation; must be > 0

N_max

Maximum sample size for the control arm allowed by the sample size re-estimation; must be >= samsz

sim_num

Number of simulation replicates

Value

A named list with the following components:

Design

Matrix with one row per look giving the look number, the information fraction, the critical boundary, the rejection rate by look and the rate of sample size increase

Summary by arm

Matrix with one row per test arm giving the test-arm mean, the control-arm mean, the drop rate by arm and the rejection rate by arm

simulation results

Named numeric vector holding the rejection rate without and with sample size re-estimation, the rate of sample size increase, the rejection rates conditional on meeting the sample size increase criteria, the simulated type I error rate, the non-type I error rejection rate, the futility rate, the planned and maximum control sample sizes, the mean simulated control sample size and the mean simulated control sample size conditional on an increase

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


masd_power_simu_adapt_normal(mu_t = c(0,0,0), mu_c = 0, sigma_t = 1, sigma_c = 1, direction = 1,
s = c(1/3,2/3,1), bry_type = 1, alpha_2 = 0.05, beta = 0.1, theta_cut = 0.01, samsz = 100,
N_max = 500, sim_num = 20)



Multiple comparisons Group sequential design: Simulations, Poisson distribution, Operating characteristics

Description

Multiple comparisons Group sequential design: Simulations, Poisson distribution, Operating characteristics

Usage

masd_power_simu_adapt_poisson(
  lambda_t,
  lambda_c,
  direction,
  s,
  bry_type,
  alpha_2,
  beta,
  theta_cut,
  samsz,
  N_max,
  sim_num
)

Arguments

lambda_t

Vector of true mean event counts of the test arms, one per dose; must be > 0

lambda_c

Mean event count of the control arm; must be > 0

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = alpha-spending

alpha_2

Type I error for the two-sided test; when bry_type = 2 this is instead the vector of two-sided type I error levels spent at each look, which must sum to the total two-sided type I error

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; 0 < beta < 1

theta_cut

Lack-of-efficacy threshold on the effect-size scale: a test arm is dropped at the interim analysis when its observed effect size is below this value

samsz

Sample size of the control arm used in the simulation; must be > 0

N_max

Maximum sample size for the control arm allowed by the sample size re-estimation; must be >= samsz

sim_num

Number of simulation replicates

Value

A named list with the following components:

Design

Matrix with one row per look giving the look number, the information fraction, the critical boundary, the rejection rate by look and the rate of sample size increase

Summary by arm

Matrix with one row per test arm giving the test-arm mean, the control-arm mean, the drop rate by arm and the rejection rate by arm

simulation results

Named numeric vector holding the rejection rate without and with sample size re-estimation, the rate of sample size increase, the rejection rates conditional on meeting the sample size increase criteria, the simulated type I error rate, the non-type I error rejection rate, the futility rate, the planned and maximum control sample sizes, the mean simulated control sample size and the mean simulated control sample size conditional on an increase

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


masd_power_simu_adapt_poisson(lambda_t = c(1.1,1.1,1.1), lambda_c = 1.1, direction = 1,
s = c(1/3,2/3,1), bry_type = 1, alpha_2 = 0.05, beta = 0.1, theta_cut = 0.01, samsz = 100,
N_max = 500, sim_num = 20)



Multiple comparisons Group sequential design: Simulations, Survival analysis, Operating characteristics

Description

Multiple comparisons Group sequential design: Simulations, Survival analysis, Operating characteristics

Usage

masd_power_simu_adapt_survival(
  HR,
  s,
  bry_type,
  alpha_2,
  surv_rate,
  HR_cut,
  evt_num,
  evt_max,
  beta,
  sim_num
)

Arguments

HR

Vector of hazard ratios of each test arm vs. the control arm; HR < 1 favours the test arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = alpha-spending

alpha_2

Type I error for the two-sided test; when bry_type = 2 this is instead the vector of two-sided type I error levels spent at each look, which must sum to the total two-sided type I error

surv_rate

Survival rate at the end of follow-up; 0 < surv_rate < 1

HR_cut

Hazard-ratio cut-off for the lack-of-efficacy rule at the interim analysis: a test arm is dropped when its observed hazard ratio is greater than HR_cut

evt_num

Planned number of events between one test arm and the control arm by the final analysis; must be > 0

evt_max

Maximum number of events between one test arm and the control arm allowed by the sample size re-estimation; must be >= evt_num

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; 0 < beta < 1

sim_num

Number of simulation replicates

Value

A named list with the following components:

Design

Matrix with one row per look giving the look number, the information fraction, the critical boundary, the rejection rate by look and the rate of sample size increase

Summary by arm

Matrix with one row per test arm giving the hazard ratio, the drop rate by arm and the rejection rate by arm

simulation results

Named numeric vector holding the rejection rate without and with sample size re-estimation, the rate of sample size increase, the rejection rates conditional on meeting the sample size increase criteria, the simulated type I error rate, the non-type I error rejection rate, the futility rate, the planned and maximum two-arm event numbers and the mean simulated two-arm event numbers with and without conditioning on an increase

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


set.seed(1)
masd_power_simu_adapt_survival(HR = c(0.63, 0.65, 0.7), s = c(1/3,2/3,1), bry_type = 1,
alpha_2 = 0.05, surv_rate = 0.5, HR_cut = 0.95, evt_num = 200, evt_max = 500, beta = 0.1,
sim_num = 2)



Multiple comparisons Group sequential design: Simulations, Binary distribution, Optimizing adaptive sequential design

Description

Multiple comparisons Group sequential design: Simulations, Binary distribution, Optimizing adaptive sequential design

Usage

masd_simu_OC_binary(
  groups,
  p_c,
  direction,
  s1,
  s2,
  alpha_2,
  alpha_2_alps_s1,
  alpha_2_alps_s2,
  theta_cut,
  samsz_1,
  samsz_2,
  N_max_1,
  N_max_2,
  beta,
  sim_num
)

Arguments

groups

Matrix of true event rates of the test arms: each row is one simulation scenario and each column one test arm/dose; 0 < groups < 1

p_c

Event rate of the control arm; 0 < p_c < 1

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s1

Vector of information fractions of the first interim analysis schedule, e.g. c(1/3, 2/3, 1); the last element must be 1

s2

Vector of information fractions of the second interim analysis schedule, e.g. c(0.5, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

alpha_2_alps_s1

Two-sided type I error levels spent at each look of the schedule s1; must sum to alpha_2

alpha_2_alps_s2

Two-sided type I error levels spent at each look of the schedule s2; must sum to alpha_2

theta_cut

Lack-of-efficacy threshold on the effect-size scale: a test arm is dropped at the interim analysis when its observed effect size is below this value

samsz_1

Sample size of the control arm used in the simulation for the first sample size scenario; must be > 0

samsz_2

Sample size of the control arm used in the simulation for the second sample size scenario; must be > 0

N_max_1

Maximum sample size for the control arm allowed by the sample size re-estimation in the first N_max scenario; must be >= samsz_1

N_max_2

Maximum sample size for the control arm allowed by the sample size re-estimation in the second N_max scenario; must be >= samsz_2

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; 0 < beta < 1

sim_num

Number of simulation replicates

Value

A named list with the following components:

O'Brien-Fleming boundaries, interim analysis schedule=s1

List holding the O'Brien-Fleming group sequential design for the schedule s1 and the simulation results for the four combinations of the two planned control sample sizes and the two maximum control sample sizes

O'Brien-Fleming boundaries, interim analysis schedule=s2

List holding the O'Brien-Fleming group sequential design for the schedule s2 and the simulation results for the four combinations of the two planned control sample sizes and the two maximum control sample sizes

Alpha-spending boundaries, interim analysis schedule=s1

List holding the alpha-spending group sequential design for the schedule s1 and the simulation results for the four combinations of the two planned control sample sizes and the two maximum control sample sizes

Alpha-spending boundaries, interim analysis schedule=s2

List holding the alpha-spending group sequential design for the schedule s2 and the simulation results for the four combinations of the two planned control sample sizes and the two maximum control sample sizes

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


set.seed(1)
masd_simu_OC_binary(groups = rbind(c(0.35,0.4,0.45),c(0.4,0.45,0.5),c(0.35,0.45,0.55),
c(0.45,0.5,0.55)), p_c = 0.3, direction = 1, s1 = c(1/3,2/3,1), s2 = c(0.5,1),
alpha_2 = 0.05, alpha_2_alps_s1 = c(0.001,0.001,0.048),
alpha_2_alps_s2 = c(0.001,0.049), theta_cut = 0.01, samsz_1 = 50, samsz_2 = 75,
N_max_1 = 1000, N_max_2 = 1500, beta = 0.1, sim_num = 2)



Multiple comparisons Group sequential design: Simulations, Negative binomial distribution, Optimizing adaptive sequential design

Description

Multiple comparisons Group sequential design: Simulations, Negative binomial distribution, Optimizing adaptive sequential design

Usage

masd_simu_OC_neg_binomial(
  groups,
  r_c,
  kappa,
  direction,
  s1,
  s2,
  alpha_2,
  alpha_2_alps_s1,
  alpha_2_alps_s2,
  theta_cut,
  samsz_1,
  samsz_2,
  N_max_1,
  N_max_2,
  beta,
  sim_num
)

Arguments

groups

Matrix of true mean rates of the test arms: each row is one simulation scenario and each column one test arm/dose; must be > 0

r_c

Mean rate of the control arm; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

direction

Test direction: 1 = larger r is better, otherwise smaller r is better

s1

Vector of information fractions of the first interim analysis schedule, e.g. c(1/3, 2/3, 1); the last element must be 1

s2

Vector of information fractions of the second interim analysis schedule, e.g. c(0.5, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

alpha_2_alps_s1

Two-sided type I error levels spent at each look of the schedule s1; must sum to alpha_2

alpha_2_alps_s2

Two-sided type I error levels spent at each look of the schedule s2; must sum to alpha_2

theta_cut

Lack-of-efficacy threshold on the effect-size scale: a test arm is dropped at the interim analysis when its observed effect size is below this value

samsz_1

Sample size of the control arm used in the simulation for the first sample size scenario; must be > 0

samsz_2

Sample size of the control arm used in the simulation for the second sample size scenario; must be > 0

N_max_1

Maximum sample size for the control arm allowed by the sample size re-estimation in the first N_max scenario; must be >= samsz_1

N_max_2

Maximum sample size for the control arm allowed by the sample size re-estimation in the second N_max scenario; must be >= samsz_2

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; 0 < beta < 1

sim_num

Number of simulation replicates

Value

A named list with the following components:

O'Brien-Fleming boundaries, interim analysis schedule=s1

List holding the O'Brien-Fleming group sequential design for the schedule s1 and the simulation results for the four combinations of the two planned control sample sizes and the two maximum control sample sizes

O'Brien-Fleming boundaries, interim analysis schedule=s2

List holding the O'Brien-Fleming group sequential design for the schedule s2 and the simulation results for the four combinations of the two planned control sample sizes and the two maximum control sample sizes

Alpha-spending boundaries, interim analysis schedule=s1

List holding the alpha-spending group sequential design for the schedule s1 and the simulation results for the four combinations of the two planned control sample sizes and the two maximum control sample sizes

Alpha-spending boundaries, interim analysis schedule=s2

List holding the alpha-spending group sequential design for the schedule s2 and the simulation results for the four combinations of the two planned control sample sizes and the two maximum control sample sizes

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


set.seed(1)
masd_simu_OC_neg_binomial(
groups = rbind(c(0.2,0.3,0.4),c(0.3,0.4,0.5),c(0.4,0.5,0.6),c(0.5,0.6,0.7)), r_c = 0.35,
kappa = 1, direction = 1, s1 = c(1/3,2/3,1), s2 = c(0.5,1), alpha_2 = 0.05,
alpha_2_alps_s1 = c(0.001,0.001,0.048), alpha_2_alps_s2 = c(0.001,0.049), theta_cut = 0.01,
samsz_1 = 50, samsz_2 = 75, N_max_1 = 1000, N_max_2 = 1500, beta = 0.1, sim_num = 2)



Multiple comparisons Group sequential design: Simulations, Normal distribution, Optimizing adaptive sequential design

Description

Multiple comparisons Group sequential design: Simulations, Normal distribution, Optimizing adaptive sequential design

Usage

masd_simu_OC_normal(
  groups,
  mu_c,
  sigma_t,
  sigma_c,
  direction,
  s1,
  s2,
  alpha_2,
  alpha_2_alps_s1,
  alpha_2_alps_s2,
  theta_cut,
  samsz_1,
  samsz_2,
  N_max_1,
  N_max_2,
  beta,
  sim_num
)

Arguments

groups

Matrix of true means of the test arms: each row is one simulation scenario and each column one test arm/dose

mu_c

Mean of the control arm

sigma_t

Standard deviation of the test arm; must be > 0

sigma_c

Standard deviation of the control arm; must be > 0

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s1

Vector of information fractions of the first interim analysis schedule, e.g. c(1/3, 2/3, 1); the last element must be 1

s2

Vector of information fractions of the second interim analysis schedule, e.g. c(0.5, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

alpha_2_alps_s1

Two-sided type I error levels spent at each look of the schedule s1; must sum to alpha_2

alpha_2_alps_s2

Two-sided type I error levels spent at each look of the schedule s2; must sum to alpha_2

theta_cut

Lack-of-efficacy threshold on the effect-size scale: a test arm is dropped at the interim analysis when its observed effect size is below this value

samsz_1

Sample size of the control arm used in the simulation for the first sample size scenario; must be > 0

samsz_2

Sample size of the control arm used in the simulation for the second sample size scenario; must be > 0

N_max_1

Maximum sample size for the control arm allowed by the sample size re-estimation in the first N_max scenario; must be >= samsz_1

N_max_2

Maximum sample size for the control arm allowed by the sample size re-estimation in the second N_max scenario; must be >= samsz_2

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; 0 < beta < 1

sim_num

Number of simulation replicates

Value

A named list with the following components:

O'Brien-Fleming boundaries, interim analysis schedule=s1

List holding the O'Brien-Fleming group sequential design for the schedule s1 and the simulation results for the four combinations of the two planned control sample sizes and the two maximum control sample sizes

O'Brien-Fleming boundaries, interim analysis schedule=s2

List holding the O'Brien-Fleming group sequential design for the schedule s2 and the simulation results for the four combinations of the two planned control sample sizes and the two maximum control sample sizes

Alpha-spending boundaries, interim analysis schedule=s1

List holding the alpha-spending group sequential design for the schedule s1 and the simulation results for the four combinations of the two planned control sample sizes and the two maximum control sample sizes

Alpha-spending boundaries, interim analysis schedule=s2

List holding the alpha-spending group sequential design for the schedule s2 and the simulation results for the four combinations of the two planned control sample sizes and the two maximum control sample sizes

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


set.seed(1)
masd_simu_OC_normal(groups = rbind(c(0.3,0.4,0.5),c(0.1,0.2,0.3),c(0.3,0.4,0.5),c(0.1,0.2,0.3)),
mu_c = 0.15, sigma_t = 1, sigma_c = 1, direction = 1, s1 = c(1/3,2/3,1), s2 = c(0.5,1),
alpha_2 = 0.05, alpha_2_alps_s1 = c(0.001,0.001,0.048), alpha_2_alps_s2 = c(0.001,0.049),
theta_cut = 0.01, samsz_1 = 50, samsz_2 = 75, N_max_1 = 1000, N_max_2 = 1500, beta = 0.1,
sim_num = 2)



Multiple comparisons Group sequential design: Simulations, Poisson distribution, Optimizing adaptive sequential design

Description

Multiple comparisons Group sequential design: Simulations, Poisson distribution, Optimizing adaptive sequential design

Usage

masd_simu_OC_poisson(
  groups,
  lambda_c,
  direction,
  s1,
  s2,
  alpha_2,
  alpha_2_alps_s1,
  alpha_2_alps_s2,
  theta_cut,
  samsz_1,
  samsz_2,
  N_max_1,
  N_max_2,
  beta,
  sim_num
)

Arguments

groups

Matrix of true mean event counts of the test arms: each row is one simulation scenario and each column one test arm/dose; must be > 0

lambda_c

Mean event count of the control arm; must be > 0

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s1

Vector of information fractions of the first interim analysis schedule, e.g. c(1/3, 2/3, 1); the last element must be 1

s2

Vector of information fractions of the second interim analysis schedule, e.g. c(0.5, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

alpha_2_alps_s1

Two-sided type I error levels spent at each look of the schedule s1; must sum to alpha_2

alpha_2_alps_s2

Two-sided type I error levels spent at each look of the schedule s2; must sum to alpha_2

theta_cut

Lack-of-efficacy threshold on the effect-size scale: a test arm is dropped at the interim analysis when its observed effect size is below this value

samsz_1

Sample size of the control arm used in the simulation for the first sample size scenario; must be > 0

samsz_2

Sample size of the control arm used in the simulation for the second sample size scenario; must be > 0

N_max_1

Maximum sample size for the control arm allowed by the sample size re-estimation in the first N_max scenario; must be >= samsz_1

N_max_2

Maximum sample size for the control arm allowed by the sample size re-estimation in the second N_max scenario; must be >= samsz_2

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; 0 < beta < 1

sim_num

Number of simulation replicates

Value

A named list with the following components:

O'Brien-Fleming boundaries, interim analysis schedule=s1

List holding the O'Brien-Fleming group sequential design for the schedule s1 and the simulation results for the four combinations of the two planned control sample sizes and the two maximum control sample sizes

O'Brien-Fleming boundaries, interim analysis schedule=s2

List holding the O'Brien-Fleming group sequential design for the schedule s2 and the simulation results for the four combinations of the two planned control sample sizes and the two maximum control sample sizes

Alpha-spending boundaries, interim analysis schedule=s1

List holding the alpha-spending group sequential design for the schedule s1 and the simulation results for the four combinations of the two planned control sample sizes and the two maximum control sample sizes

Alpha-spending boundaries, interim analysis schedule=s2

List holding the alpha-spending group sequential design for the schedule s2 and the simulation results for the four combinations of the two planned control sample sizes and the two maximum control sample sizes

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


set.seed(1)
masd_simu_OC_poisson(
groups = rbind(c(0.2,0.3,0.4),c(0.3,0.4,0.5),c(0.4,0.5,0.6),c(0.5,0.6,0.7)), lambda_c = 0.3,
direction = 1, s1 = c(1/3,2/3,1), s2 = c(0.5,1), alpha_2 = 0.05,
alpha_2_alps_s1 = c(0.001,0.001,0.048), alpha_2_alps_s2 = c(0.001,0.049), theta_cut = 0.01,
samsz_1 = 50, samsz_2 = 75, N_max_1 = 1000, N_max_2 = 1500, beta = 0.1, sim_num = 2)



Multiple comparisons Group sequential design: Simulations, Survival analysis, Optimizing adaptive sequential design

Description

Multiple comparisons Group sequential design: Simulations, Survival analysis, Optimizing adaptive sequential design

Usage

masd_simu_OC_survival(
  groups,
  s1,
  s2,
  alpha_2,
  alpha_2_alps_s1,
  alpha_2_alps_s2,
  surv_rate,
  evt_num_1,
  evt_num_2,
  evt_max_1,
  evt_max_2,
  HR_cut,
  beta,
  sim_num
)

Arguments

groups

Matrix of true hazard ratios of each test arm vs. the control arm: each row is one simulation scenario and each column one test arm; must be > 0

s1

Vector of information fractions of the first interim analysis schedule, e.g. c(1/3, 2/3, 1); the last element must be 1

s2

Vector of information fractions of the second interim analysis schedule, e.g. c(0.5, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

alpha_2_alps_s1

Two-sided type I error levels spent at each look of the schedule s1; must sum to alpha_2

alpha_2_alps_s2

Two-sided type I error levels spent at each look of the schedule s2; must sum to alpha_2

surv_rate

Survival rate at the end of follow-up; 0 < surv_rate < 1

evt_num_1

Planned number of events between one test arm and the control arm by the final analysis in the first event number scenario; must be > 0

evt_num_2

Planned number of events between one test arm and the control arm by the final analysis in the second event number scenario; must be > 0

evt_max_1

Maximum number of events between one test arm and the control arm in the first maximum-event-number scenario; must be >= evt_num_1

evt_max_2

Maximum number of events between one test arm and the control arm in the second maximum-event-number scenario; must be >= evt_num_2

HR_cut

Hazard-ratio cut-off for the lack-of-efficacy rule at the interim analysis: a test arm is dropped when its observed hazard ratio is greater than HR_cut

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; 0 < beta < 1

sim_num

Number of simulation replicates

Value

A named list with the following components:

O'Brien-Fleming boundaries, interim analysis schedule=s1

List holding the O'Brien-Fleming group sequential design for the schedule s1 and the simulation results for the four combinations of the two planned event numbers and the two maximum event numbers

O'Brien-Fleming boundaries, interim analysis schedule=s2

List holding the O'Brien-Fleming group sequential design for the schedule s2 and the simulation results for the four combinations of the two planned event numbers and the two maximum event numbers

Alpha-spending boundaries, interim analysis schedule=s1

List holding the alpha-spending group sequential design for the schedule s1 and the simulation results for the four combinations of the two planned event numbers and the two maximum event numbers

Alpha-spending boundaries, interim analysis schedule=s2

List holding the alpha-spending group sequential design for the schedule s2 and the simulation results for the four combinations of the two planned event numbers and the two maximum event numbers

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


set.seed(1)
masd_simu_OC_survival(
groups = rbind(c(0.85, 0.87, 0.9), c(0.8, 0.82, 0.85), c(0.75, 0.78, 0.8), c(0.7, 0.75, 0.8)),
s1 = c(1/3,2/3,1), s2 = c(0.5,1), alpha_2 = 0.05, alpha_2_alps_s1 = c(0.001,0.001,0.048),
alpha_2_alps_s2 = c(0.001,0.049), surv_rate = 0.5, evt_num_1 = 200, evt_num_2 = 300,
evt_max_1 = 2000, evt_max_2 = 3000, HR_cut = 0.95, beta = 0.1, sim_num = 2)



Single arm phase 2 oncology trial: Two-stage design, the midpoint design

Description

Single arm phase 2 oncology trial: Two-stage design, the midpoint design

Usage

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

Arguments

alpha

Type I error for the one-sided test

beta

Type II error rate, i.e. 1 - power

p_0

Response rate indicating low activity with insufficient clinical benefit

p_low

Minimally clinically beneficial response rate

p_1

Assumed response rate

q

Weight between 0 and 1 used to interpolate the first-look sample size of the mid-point design from the two Simon's designs: n_1 = q * n_1(p_1) + (1 - q) * n_1(p_low), where n_1(p_1) and n_1(p_low) are the first-look sample sizes of Simon's designs with target response rates p_1 and p_low; 0 < q < 1

d_12_cut

Sets the minimal difference between n_2 and n_1 for the design; min(n_2 - n_1)

Value

A named list with the following components:

Simon's design: p=p_1

A matrix with one row per design (minimax, optimal and average) for Simon's design using p_1 as the target response rate, with columns r1, n1, r_2, n_2, EN(p0) (expected sample size under p_0), PET(p0) (probability of early termination under p_0), t1_err, PET_p (PET under p_1), PET_p_low (PET under p_low), power_p (power under p_1) and power_p_low (power under p_low)

Simon's design: p=p_low

The corresponding matrix for Simon's design using p_low as the target response rate

The mid-point design: p=p_1

A matrix with one row per design (minimax, optimal and average) and columns r_1, r_2, n_1, n_2, r_1_e (the trial is stopped for superiority if at least r_1_e responses are observed at the first look), t1_err, PET_p_low, power_p (power under p_1), PET_p0, EN_p0 (expected sample size under p_0), PW_p_low (power under p_low) and q. If q is too large for the probability of early termination under p_low to be below beta, a character string with a warning message is returned instead

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.5, q = 0,
d_12_cut = 5)


Multiple comparisons Group sequential design: Simulations, Binary distribution, Type I error and power

Description

Multiple comparisons Group sequential design: Simulations, Binary distribution, Type I error and power

Usage

msd_power_simu_binary(
  p_t,
  p_c,
  direction,
  s,
  bry_type,
  alpha_2,
  samsz,
  sim_num
)

Arguments

p_t

Vector of true event rates of the test arms, one per dose; 0 < p_t < 1

p_c

Event rate of the control arm; 0 < p_c < 1

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = alpha-spending

alpha_2

Type I error for the two-sided test; when bry_type = 2 this is instead the vector of two-sided type I error levels spent at each look, which must sum to the total two-sided type I error

samsz

Sample size of the control arm used in the simulation; must be > 0

sim_num

Number of simulation replicates

Value

A named list with the following components:

Design

Matrix with one row per look giving the look number, the information fraction, the critical boundary and the rejection rate by look

Summary by arm

Matrix with one row per test arm giving the test-arm event rate, the control-arm event rate and the rejection rate by arm

simulation results

Named numeric vector holding the rejection rate, the simulated type I error rate, the non-type I error rejection rate, the planned control and total sample sizes and the mean simulated control and total sample sizes

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

msd_power_simu_binary(p_t = c(0.4,0.4), p_c = 0.4, direction = 1, s = c(1/3,2/3,1),
bry_type = 1, alpha_2 = 0.05, samsz = 100, sim_num = 20)


Multiple comparisons Group sequential design: Simulations, Negative binomial distribution, Type I error and power

Description

Multiple comparisons Group sequential design: Simulations, Negative binomial distribution, Type I error and power

Usage

msd_power_simu_neg_binomial(
  r_t,
  r_c,
  kappa,
  direction,
  s,
  bry_type,
  alpha_2,
  samsz,
  sim_num
)

Arguments

r_t

Vector of true mean rates of the test arms, one per dose; must be > 0

r_c

Mean rate of the control arm; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

direction

Test direction: 1 = larger r is better, otherwise smaller r is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = alpha-spending

alpha_2

Type I error for the two-sided test; when bry_type = 2 this is instead the vector of two-sided type I error levels spent at each look, which must sum to the total two-sided type I error

samsz

Sample size of the control arm used in the simulation; must be > 0

sim_num

Number of simulation replicates

Value

A named list with the following components:

Design

Matrix with one row per look giving the look number, the information fraction, the critical boundary and the rejection rate by look

Summary by arm

Matrix with one row per test arm giving the test-arm mean rate, the control-arm mean rate and the rejection rate by arm

simulation results

Named numeric vector holding the rejection rate, the simulated type I error rate, the non-type I error rejection rate, the planned control and total sample sizes and the mean simulated control and total sample sizes

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

msd_power_simu_neg_binomial(r_t = c(1.1,1.1,1.1), r_c = 1.1, kappa = 1, direction = 1,
s = c(1/3,2/3,1), bry_type = 1, alpha_2 = 0.05, samsz = 100, sim_num = 20)


Multiple comparisons Group sequential design: Simulations, Normal distribution, Type I error and power

Description

Multiple comparisons Group sequential design: Simulations, Normal distribution, Type I error and power

Usage

msd_power_simu_normal(
  mu_t,
  mu_c,
  sigma_t,
  sigma_c,
  direction,
  s,
  bry_type,
  alpha_2,
  samsz,
  sim_num
)

Arguments

mu_t

Vector of true means of the test arms, one per dose

mu_c

Mean of the control arm

sigma_t

Standard deviation of the test arm; must be > 0

sigma_c

Standard deviation of the control arm; must be > 0

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = alpha-spending

alpha_2

Type I error for the two-sided test; when bry_type = 2 this is instead the vector of two-sided type I error levels spent at each look, which must sum to the total two-sided type I error

samsz

Sample size of the control arm used in the simulation; must be > 0

sim_num

Number of simulation replicates

Value

A named list with the following components:

Design

Matrix with one row per look giving the look number, the information fraction, the critical boundary and the rejection rate by look

Summary by arm

Matrix with one row per test arm giving the test-arm mean, the control-arm mean and the rejection rate by arm

simulation results

Named numeric vector holding the rejection rate, the simulated type I error rate, the non-type I error rejection rate, the planned control and total sample sizes and the mean simulated control and total sample sizes

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

msd_power_simu_normal(mu_t = c(0,0,0), mu_c = 0, sigma_t = 1, sigma_c = 1, direction = 1,
s = c(1/3,2/3,1), bry_type = 1, alpha_2 = 0.05, samsz = 100, sim_num = 20)


Multiple comparisons Group sequential design: Simulations, Poisson distribution, Type I error and power

Description

Multiple comparisons Group sequential design: Simulations, Poisson distribution, Type I error and power

Usage

msd_power_simu_poisson(
  lambda_c,
  lambda_t,
  direction,
  s,
  bry_type,
  alpha_2,
  samsz,
  sim_num
)

Arguments

lambda_c

Mean event count of the control arm; must be > 0

lambda_t

Vector of true mean event counts of the test arms, one per dose; must be > 0

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = alpha-spending

alpha_2

Type I error for the two-sided test; when bry_type = 2 this is instead the vector of two-sided type I error levels spent at each look, which must sum to the total two-sided type I error

samsz

Sample size of the control arm used in the simulation; must be > 0

sim_num

Number of simulation replicates

Value

A named list with the following components:

Design

Matrix with one row per look giving the look number, the information fraction, the critical boundary and the rejection rate by look

Summary by arm

Matrix with one row per test arm giving the test-arm mean, the control-arm mean and the rejection rate by arm

simulation results

Named numeric vector holding the rejection rate, the simulated type I error rate, the non-type I error rejection rate, the planned control and total sample sizes and the mean simulated control and total sample sizes

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

msd_power_simu_poisson(lambda_c = 0.8, lambda_t = c(0.8,0.8,0.8), direction = 1,
s = c(1/3,2/3,1), bry_type = 1, alpha_2 = 0.05, samsz = 100, sim_num = 20)


Multiple comparisons Group sequential design: Simulations, Survival analysis, Type I error and power

Description

Multiple comparisons Group sequential design: Simulations, Survival analysis, Type I error and power

Usage

msd_power_simu_survival(HR, s, bry_type, alpha_2, surv_rate, evt_num, sim_num)

Arguments

HR

Vector of hazard ratios of each test arm vs. the control arm; HR < 1 favours the test arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = alpha-spending

alpha_2

Type I error for the two-sided test; when bry_type = 2 this is instead the vector of two-sided type I error levels spent at each look, which must sum to the total two-sided type I error

surv_rate

Survival rate at the end of follow-up; 0 < surv_rate < 1

evt_num

Planned number of events between one test arm and the control arm by the final analysis; must be > 0

sim_num

Number of simulation replicates

Value

A named list with the following components:

Design

Matrix with one row per look giving the look number, the information fraction, the critical boundary and the rejection rate by look

Summary by arm

Matrix with one row per test arm giving the hazard ratio and the rejection rate by arm

simulation results

Named numeric vector holding the rejection rate, the simulated type I error rate, the non-type I error rejection rate, the planned two-arm and total event numbers and the mean simulated two-arm and total event numbers

References

P. Gao & Y. Li (2024) Adaptive Multiple Comparison Sequential Design (AMCSD) for clinical trials, Journal of Biopharmaceutical Statistics, 34:3, 424-440, DOI:10.1080/10543406.2023.2233590. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2023.2233590

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

msd_power_simu_survival(HR = c(0.8,0.8), s = c(1/3,2/3,1), bry_type = 1, alpha_2 = 0.05,
surv_rate = 0.5, evt_num = 800, sim_num = 20)


Hybrid: New sample size estimation

Description

Hybrid: New sample size estimation

Usage

new_sample_size_hybrid(
  N_planned,
  c_bry,
  t_prior,
  theta_prior,
  N_inter,
  t_inter,
  theta_hat_inter,
  gamma,
  beta
)

Arguments

N_planned

Planned sample size: the planned sample size at the final analysis

c_bry

Critical boundary or threshold for rejecting the null hypothesis at the final analysis

t_prior

Prior information time: the prior distribution of theta is assumed to have a normal distribution, and the Fisher's information time is the reciprocal of the variance of the prior distribution; set t_prior = 0 for a non-informative prior

theta_prior

Mean effect size of prior: the mean of the normal prior distribution of theta; set theta_prior = 0 for a non-informative prior

N_inter

Sample size at interim analysis: the number of subjects with data at the interim analysis

t_inter

Information time at interim analysis: the Fisher information at the interim analysis, the reciprocal of the variance of the unbiased maximum likelihood estimate theta_hat_inter

theta_hat_inter

Estimated effect size at interim analysis: the maximum likelihood estimate of theta at the interim analysis

gamma

Parameter chosen for the credible interval modified predictive power (CI_MPP); it defines the (1 - gamma) credible interval of the posterior for theta, e.g. gamma = 0.5 gives a 50 percent interval

beta

Conditional type II error; 1 - beta is the target conditional power used for the sample size re-estimation

Value

A named list with the following components:

New sample sizes

A data frame with the columns "prior type", "SSR method" and "new sample size", giving the new sample size for every combination of prior type and sample size re-estimation (SSR) method. The prior types are the non-informative prior (mean of the prior zero and information time zero) and the informative prior entered by the user. Within each prior type the four SSR methods are the conditional power (cp), the predictive power (pp), the modified predictive power (mpp) and the credible interval modified predictive power (ci_mpp), each being the sample size that provides 1 - beta of that power; the sample size is NA when the target conditional power cannot be reached. For the informative prior the cp entry is based on the Bayesian posterior mean of theta

Reference

References for the methods

References

Gao, P. Improving the effectiveness of sample size re-estimation: an operating characteristic focused, hybrid frequentist-Bayesian approach, Statistics in Medicine, 2025; 44:e10310. To link to this article: https://onlinelibrary.wiley.com/doi/10.1002/sim.10310.

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796.

C. R. Mehta, S. J. Pocock. Adaptive increase in sample size when interim results are promising: A practical guide with examples. Statistics in Medicine. Volume30, Issue28, 10 December 2011, Pages 3267-3284

Examples

new_sample_size_hybrid(N_planned = 100, c_bry = 1.96, t_prior = 45, theta_prior = 0.5,
N_inter = 60, t_inter = 50, theta_hat_inter = 0.3, gamma = 0.5, beta = 0.1)


Single arm phase 2 oncology trial: Simulations: adaptive three stage design

Description

Single arm phase 2 oncology trial: 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

Assumed response rate

p_0

Response rate indicating low activity with insufficient clinical benefit, i.e. the response rate under the null hypothesis

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

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

n_3

Number of patients at third look

r_3

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

N_max

Maximum sample size for the trial

beta

Type II error rate, i.e. 1 - power

sim_num

Number of simulation replicates

Value

A named list with the following components:

rate of rejection– without continity correction

Rate of rejection of the null hypothesis over the simulation replicates, using the response-count boundary without continuity correction

rejection rate with continuity correction

Rate of rejection of the null hypothesis over the simulation replicates when the continuity correction is applied to the response-count boundary

Average sample size

Average sample size over the simulation replicates, EN(p_1)

Rate of early termination for futility

Rate of early termination for futility over the simulation replicates, 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_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=20)


Single arm phase 2 oncology trial, Simulations: adaptive two stage design

Description

Single arm phase 2 oncology trial, 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

Assumed response rate

p_0

Response rate indicating low activity with insufficient clinical benefit, i.e. the response rate under the null hypothesis

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

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

n_2

Number of patients at second look

r_2

If 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 rate, i.e. 1 - power

sim_num

Number of simulation replicates

Value

A named list with the following components:

rate of rejection– without continity correction

Rate of rejection of the null hypothesis over the simulation replicates, using the response-count boundary without continuity correction

rejection rate with continuity correction

Rate of rejection of the null hypothesis over the simulation replicates when the continuity correction is applied to the response-count boundary

Average sample size

Average sample size over the simulation replicates, EN(p_1)

Rate of early termination for futility

Rate of early termination for futility over the simulation replicates, PET(p_1)

summary by case

Matrix summarising the simulation results by case, with one column per case and one row per statistic: case rate, mean sample size, rejection rate, conditional power, proportion of replicates with p_hat > p_1, rejection rate using the critical boundary and corrected rejection rate

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

set.seed(1)
one_arm_ad_two_stg_binary(p_1 = 0.33, p_0 = 0.2, n_1 = 75, r_1 = 18, r_1_e = 26, n_2 = 80,
r_2 = 23, N_max = 140, beta = 0.1, sim_num = 20)


Single arm phase 2 oncology trial: Simulations, Two stage fixed expanded Simon's design: either hybrid or mid-point design

Description

Single arm phase 2 oncology trial: 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

Assumed response rate

p_0

Response rate indicating low activity with insufficient clinical benefit, i.e. the response rate under the null hypothesis

n_1

Number of patients at first look

r_1_f

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

r_1_e

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

n_2

Number of patients at second look

r_2

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

sim_num

Number of simulation replicates

Value

A named list with the following components:

Rate of rejection

Rate of rejection of the null hypothesis over the simulation replicates

Average sample size

Average sample size over the simulation replicates, EN(p_1)

Rate of early termination for futility

Rate of early termination for futility over the simulation replicates, 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=20)


Single arm phase 2 oncology trial: Simulations, Expanded Simon's design: the three stage design, no sample size change

Description

Single arm phase 2 oncology trial: 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

Assumed response rate

p_0

Response rate indicating low activity with insufficient clinical benefit, i.e. the response rate under the null hypothesis

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 r_2_f responses are observed at the second look, then the trial would be stopped for futility

r_2_e

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

n_3

Number of patients at third look

r_3

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

sim_num

Number of simulation replicates

Value

A named list with the following components:

Rate of rejection

Rate of rejection of the null hypothesis over the simulation replicates

Average sample size

Average sample size over the simulation replicates, EN(p_1)

Rate of early termination for futility

Rate of early termination for futility over the simulation replicates, 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=20)


Single arm phase 2 oncology trial: Simulations: two stage fixed Simon's design

Description

Single arm phase 2 oncology trial: 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

Assumed response rate

p_0

Response rate indicating low activity with insufficient clinical benefit, i.e. the response rate under the null hypothesis

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 more than r_2 responses are observed at the second look, then the null hypothesis will be rejected

sim_num

Number of simulation replicates

Value

A named list with the following components:

Rate of rejection

Rate of rejection of the null hypothesis over the simulation replicates, i.e. the power when p_1 > p_0 and the type I error rate when p_1 = p_0

Average sample size

Average sample size over the simulation replicates, EN(p_1)

Rate of early termination for futility

Rate of early termination for futility over the simulation replicates, 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=20)


Plot method for a Simon's two-stage phase II design

Description

Plot method for a Simon's two-stage phase II design

Usage

## S3 method for class 'ph2simon'
plot(x, ...)

Arguments

x

An object of class 'ph2simon', as returned by the internal 'ph2simon' helper

...

Further graphical arguments passed to 'plot'

Value

'NULL', invisibly. Called for the side effect of drawing the expected-sample-size curve.


Group sequential designs / Adaptive sequential designs: Binary distribution, Superiority trial, Power calculation, O'Brien-Fleming boundary

Description

Group sequential designs / Adaptive sequential designs: Binary distribution, Superiority trial, Power calculation, O'Brien-Fleming boundary

Usage

power_OF_boundary_binary_diff(p_t, p_c, s, alpha_2, sampsz_control, rand_ratio)

Arguments

p_t

Response rate (probability of response) in the test arm; 0 < p_t < 1

p_c

Response rate (probability of response) in the control arm; 0 < p_c < 1

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Examples

power_OF_boundary_binary_diff(p_t = 0.4, p_c = 0.3, s = c(1/3, 2/3, 1), alpha_2 = 0.05,
sampsz_control = 100, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Binary distribution, Non-inferiority trial, Power calculation, O'Brien-Fleming boundary

Description

Group sequential designs / Adaptive sequential designs: Binary distribution, Non-inferiority trial, Power calculation, O'Brien-Fleming boundary

Usage

power_OF_boundary_binary_diff_NI(
  p_t,
  p_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio
)

Arguments

p_t

Response rate (probability of response) in the test arm; 0 < p_t < 1

p_c

Response rate (probability of response) in the control arm; 0 < p_c < 1

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Examples

power_OF_boundary_binary_diff_NI(p_t = 0.4, p_c = 0.3, margin = 0.1, direction = 0,
s = c(1/3, 2/3, 1), alpha = 0.025, sampsz_control = 100, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Superiority trial, Power calculation, O'Brien-Fleming boundary

Description

Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Superiority trial, Power calculation, O'Brien-Fleming boundary

Usage

power_OF_boundary_neg_binomial(
  r_t,
  r_c,
  s,
  alpha_2,
  sampsz_control,
  rand_ratio,
  nu_t,
  kappa
)

Arguments

r_t

Event rate (mean number of events per unit of exposure time) in the test arm; must be > 0

r_c

Event rate (mean number of events per unit of exposure time) in the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time (follow-up time) of each subject, used to convert the number of events into a rate; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Reference

Reference for the sample size formula (Zhu and Lakkis, 2014)

Examples

power_OF_boundary_neg_binomial(r_t = c(1.1, 1.1, 1.1), r_c = 1.1, s = c(1/3, 2/3, 1),
alpha_2 = 0.05, sampsz_control = 100, rand_ratio = 1, nu_t = 6, kappa = 1)


Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Non-inferiority trial, Power calculation, O'Brien-Fleming boundary

Description

Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Non-inferiority trial, Power calculation, O'Brien-Fleming boundary

Usage

power_OF_boundary_neg_binomial_NI(
  r_t,
  r_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio,
  nu_t,
  kappa
)

Arguments

r_t

Event rate (mean number of events per unit of exposure time) in the test arm; must be > 0

r_c

Event rate (mean number of events per unit of exposure time) in the control arm; must be > 0

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger r_t is better, otherwise smaller r_t is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time (follow-up time) of each subject, used to convert the number of events into a rate; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Reference

Reference for the sample size formula (Zhu and Lakkis, 2014)

Examples

power_OF_boundary_neg_binomial_NI(r_t = c(1.1, 1.1, 1.1), r_c = 1.1, margin = 0.1,
direction = 0, s = c(1/3, 2/3, 1), alpha = 0.025, sampsz_control = 100, rand_ratio = 1,
nu_t = 6, kappa = 1)


Group sequential designs / Adaptive sequential designs: Normal distribution, Superiority trial, Power calculation, O'Brien-Fleming boundary

Description

Group sequential designs / Adaptive sequential designs: Normal distribution, Superiority trial, Power calculation, O'Brien-Fleming boundary

Usage

power_OF_boundary_normal(
  mu_t,
  mu_c,
  std_t,
  std_c,
  s,
  sampsz_control,
  rand_ratio,
  alpha_2
)

Arguments

mu_t

Mean of the test arm

mu_c

Mean of the control arm

std_t

Standard deviation of the test arm; must be > 0

std_c

Standard deviation of the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Examples

power_OF_boundary_normal(mu_t = 2.6, mu_c = 0.6, std_t = 9.43, std_c = 9.86, s = c(1/3, 2/3, 1),
sampsz_control = 100, rand_ratio = 1, alpha_2 = 0.05)


Group sequential designs / Adaptive sequential designs: Normal distribution, Non-inferiority trial, Power calculation, O'Brien-Fleming boundary

Description

Group sequential designs / Adaptive sequential designs: Normal distribution, Non-inferiority trial, Power calculation, O'Brien-Fleming boundary

Usage

power_OF_boundary_normal_NI(
  mu_t,
  mu_c,
  std_t,
  std_c,
  margin,
  direction,
  s,
  sampsz_control,
  rand_ratio,
  alpha
)

Arguments

mu_t

Mean of the test arm

mu_c

Mean of the control arm

std_t

Standard deviation of the test arm; must be > 0

std_c

Standard deviation of the control arm; must be > 0

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

alpha

Type I error for the one-sided test; 0 < alpha < 1

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Examples

power_OF_boundary_normal_NI(mu_t = 2.6, mu_c = 0.6, std_t = 9.43, std_c = 9.86, margin = 0.1,
direction = 0, s = c(1/3, 2/3, 1), sampsz_control = 100, rand_ratio = 1, alpha = 0.025)


Group sequential designs / Adaptive sequential designs: Poisson distribution, Superiority trial, Power calculation, O'Brien-Fleming boundary

Description

Group sequential designs / Adaptive sequential designs: Poisson distribution, Superiority trial, Power calculation, O'Brien-Fleming boundary

Usage

power_OF_boundary_poisson(
  lambda_t,
  lambda_c,
  s,
  alpha_2,
  sampsz_control,
  rand_ratio
)

Arguments

lambda_t

Event rate (mean number of events) in the test arm; must be > 0

lambda_c

Event rate (mean number of events) in the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Examples

power_OF_boundary_poisson(lambda_t = 1.1, lambda_c = 1.0, s = c(1/3, 2/3, 1),
alpha_2 = 0.05, sampsz_control = 100, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Poisson distribution, Non-inferiority trial, Power calculation, O'Brien-Fleming boundary

Description

Group sequential designs / Adaptive sequential designs: Poisson distribution, Non-inferiority trial, Power calculation, O'Brien-Fleming boundary

Usage

power_OF_boundary_poisson_NI(
  lambda_t,
  lambda_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio
)

Arguments

lambda_t

Event rate (mean number of events) in the test arm; must be > 0

lambda_c

Event rate (mean number of events) in the control arm; must be > 0

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Examples

power_OF_boundary_poisson_NI(lambda_t = 1.1, lambda_c = 1.0, margin = 0.1, direction = 0,
s = c(1/3, 2/3, 1), alpha = 0.025, sampsz_control = 100, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Survival analysis, Superiority trial, Power calculation, O'Brien-Fleming boundary

Description

Group sequential designs / Adaptive sequential designs: Survival analysis, Superiority trial, Power calculation, O'Brien-Fleming boundary

Usage

power_OF_boundary_survival_Schoenfeld(HR, s, events_tot, alpha_2, rand_ratio)

Arguments

HR

Hazard ratio of the test arm vs. the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

events_tot

Total number of events across both the test arm and the control arm

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

reference

Reference for the sample size formula (Schoenfeld, 1983)

Examples

power_OF_boundary_survival_Schoenfeld(HR = 0.7, s = c(1/3, 2/3, 1), events_tot = 100,
alpha_2 = 0.05, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Survival analysis, Non-inferiority trial, Power calculation, O'Brien-Fleming boundary

Description

Group sequential designs / Adaptive sequential designs: Survival analysis, Non-inferiority trial, Power calculation, O'Brien-Fleming boundary

Usage

power_OF_boundary_survival_Schoenfeld_NI(
  HR,
  margin,
  direction,
  s,
  events_tot,
  alpha,
  rand_ratio
)

Arguments

HR

Hazard ratio of the test arm vs. the control arm; must be > 0

margin

Non-inferiority margin on the hazard ratio scale; must be > 0, with HR > margin required when direction is 1 and HR < margin required otherwise

direction

Test direction: 1 = larger HR is better, otherwise smaller HR is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

events_tot

Total number of events across both the test arm and the control arm

alpha

Type I error for the one-sided test; 0 < alpha < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

reference

Reference for the sample size formula (Schoenfeld, 1983)

Examples

power_OF_boundary_survival_Schoenfeld_NI(HR = 0.7, margin = 0.1, direction = 0,
s = c(1/3, 2/3, 1), events_tot = 100, alpha = 0.025, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Binary distribution, Superiority trial, Power calculation, Alpha-spending boundary

Description

Group sequential designs / Adaptive sequential designs: Binary distribution, Superiority trial, Power calculation, Alpha-spending boundary

Usage

power_alsp_boundary_binary_diff(
  p_t,
  p_c,
  s,
  alpha_2,
  sampsz_control,
  rand_ratio
)

Arguments

p_t

Response rate (probability of response) in the test arm; 0 < p_t < 1

p_c

Response rate (probability of response) in the control arm; 0 < p_c < 1

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test, entered for the alpha-spending boundary as the vector of the two-sided alpha-spending values alpha_1, ..., alpha_K at the K analyses; each element must be > 0 and the elements must sum to alpha_2

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Examples

power_alsp_boundary_binary_diff(p_t = 0.2, p_c = 0.6, s = c(1/3,2/3,1),
alpha_2 = c(0.001,0.001,0.048), sampsz_control = 27, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Binary distribution, Non-inferiority trial, Power calculation, Alpha-spending boundary

Description

Group sequential designs / Adaptive sequential designs: Binary distribution, Non-inferiority trial, Power calculation, Alpha-spending boundary

Usage

power_alsp_boundary_binary_diff_NI(
  p_t,
  p_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio
)

Arguments

p_t

Response rate (probability of response) in the test arm; 0 < p_t < 1

p_c

Response rate (probability of response) in the control arm; 0 < p_c < 1

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test, entered for the alpha-spending boundary as the vector of the one-sided alpha-spending values alpha_1, ..., alpha_K at the K analyses; each element must be > 0 and the elements must sum to alpha

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Examples

power_alsp_boundary_binary_diff_NI(p_t = 0.2, p_c = 0.6, margin = 0.15, direction = 1,
s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023), sampsz_control = 14, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Superiority trial, Power calculation, Alpha-spending boundary

Description

Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Superiority trial, Power calculation, Alpha-spending boundary

Usage

power_alsp_boundary_neg_binomial(
  r_t,
  r_c,
  s,
  alpha_2,
  sampsz_control,
  rand_ratio,
  nu_t,
  kappa
)

Arguments

r_t

Event rate (mean number of events per unit of exposure time) in the test arm; must be > 0

r_c

Event rate (mean number of events per unit of exposure time) in the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test, entered for the alpha-spending boundary as the vector of the two-sided alpha-spending values alpha_1, ..., alpha_K at the K analyses; each element must be > 0 and the elements must sum to alpha_2

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time (follow-up time) of each subject, used to convert the number of events into a rate; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Reference

Reference for the sample size formula (Zhu and Lakkis, 2014)

Examples

power_alsp_boundary_neg_binomial(r_t = 1, r_c = 0.8, s = 1, alpha_2 = 0.05,
sampsz_control = 897, rand_ratio = 1, nu_t = 1, kappa = 1)


Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Non-inferiority trial, Power calculation, Alpha-spending boundary

Description

Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Non-inferiority trial, Power calculation, Alpha-spending boundary

Usage

power_alsp_boundary_neg_binomial_NI(
  r_t,
  r_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio,
  nu_t,
  kappa
)

Arguments

r_t

Event rate (mean number of events per unit of exposure time) in the test arm; must be > 0

r_c

Event rate (mean number of events per unit of exposure time) in the control arm; must be > 0

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger r_t is better, otherwise smaller r_t is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test, entered for the alpha-spending boundary as the vector of the one-sided alpha-spending values alpha_1, ..., alpha_K at the K analyses; each element must be > 0 and the elements must sum to alpha

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time (follow-up time) of each subject, used to convert the number of events into a rate; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Reference

Reference for the sample size formula (Zhu and Lakkis, 2014)

Examples

power_alsp_boundary_neg_binomial_NI(r_t = 1, r_c = 0.8, margin = 0, direction = 1, s = 1,
alpha = 0.025, sampsz_control = 897, rand_ratio = 1, nu_t = 1, kappa = 1)


Group sequential designs / Adaptive sequential designs: Normal distribution, Superiority trial, Power calculation, Alpha-spending boundary

Description

Group sequential designs / Adaptive sequential designs: Normal distribution, Superiority trial, Power calculation, Alpha-spending boundary

Usage

power_alsp_boundary_normal(
  mu_t,
  mu_c,
  std_t,
  std_c,
  s,
  sampsz_control,
  rand_ratio,
  alpha_2
)

Arguments

mu_t

Mean of the test arm

mu_c

Mean of the control arm

std_t

Standard deviation of the test arm; must be > 0

std_c

Standard deviation of the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

alpha_2

Type I error for the two-sided test, entered for the alpha-spending boundary as the vector of the two-sided alpha-spending values alpha_1, ..., alpha_K at the K analyses; each element must be > 0 and the elements must sum to alpha_2

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Examples

power_alsp_boundary_normal(mu_t = 0.2, mu_c = 0, std_t = 1, std_c = 1, s = c(1/3,2/3,1),
sampsz_control = 527, rand_ratio = 1, alpha_2 = c(0.001,0.001,0.048))


Group sequential designs / Adaptive sequential designs: Normal distribution, Non-inferiority trial, Power calculation, Alpha-spending boundary

Description

Group sequential designs / Adaptive sequential designs: Normal distribution, Non-inferiority trial, Power calculation, Alpha-spending boundary

Usage

power_alsp_boundary_normal_NI(
  mu_t,
  mu_c,
  std_t,
  std_c,
  margin,
  direction,
  s,
  sampsz_control,
  rand_ratio,
  alpha
)

Arguments

mu_t

Mean of the test arm

mu_c

Mean of the control arm

std_t

Standard deviation of the test arm; must be > 0

std_c

Standard deviation of the control arm; must be > 0

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

alpha

Type I error for the one-sided test, entered for the alpha-spending boundary as the vector of the one-sided alpha-spending values alpha_1, ..., alpha_K at the K analyses; each element must be > 0 and the elements must sum to alpha

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Examples

power_alsp_boundary_normal_NI(mu_t = 0.2, mu_c = 0, std_t = 1, std_c = 1, margin = 0.15,
direction = 1, s = c(1/3,2/3,1), sampsz_control = 534, rand_ratio = 1,
alpha = c(0.001,0.001,0.023))


Group sequential designs / Adaptive sequential designs: Poisson distribution, Superiority trial, Power calculation, Alpha-spending boundary

Description

Group sequential designs / Adaptive sequential designs: Poisson distribution, Superiority trial, Power calculation, Alpha-spending boundary

Usage

power_alsp_boundary_poisson(
  lambda_t,
  lambda_c,
  s,
  alpha_2,
  sampsz_control,
  rand_ratio
)

Arguments

lambda_t

Event rate (mean number of events) in the test arm; must be > 0

lambda_c

Event rate (mean number of events) in the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test, entered for the alpha-spending boundary as the vector of the two-sided alpha-spending values alpha_1, ..., alpha_K at the K analyses; each element must be > 0 and the elements must sum to alpha_2

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Examples

power_alsp_boundary_poisson(lambda_t = 0.2, lambda_c = 0.4, s = c(1/3,2/3,1),
alpha_2 = c(0.001,0.001,0.048), sampsz_control = 158, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Poisson distribution, Non-inferiority trial, Power calculation, Alpha-spending boundary

Description

Group sequential designs / Adaptive sequential designs: Poisson distribution, Non-inferiority trial, Power calculation, Alpha-spending boundary

Usage

power_alsp_boundary_poisson_NI(
  lambda_t,
  lambda_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio
)

Arguments

lambda_t

Event rate (mean number of events) in the test arm; must be > 0

lambda_c

Event rate (mean number of events) in the control arm; must be > 0

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test, entered for the alpha-spending boundary as the vector of the one-sided alpha-spending values alpha_1, ..., alpha_K at the K analyses; each element must be > 0 and the elements must sum to alpha

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Examples

power_alsp_boundary_poisson_NI(lambda_t = 0.2, lambda_c = 0.4, margin = 0.15, direction = 1,
s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023), sampsz_control = 52, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Survival analysis, Superiority trial, Power calculation, Alpha-spending boundary

Description

Group sequential designs / Adaptive sequential designs: Survival analysis, Superiority trial, Power calculation, Alpha-spending boundary

Usage

power_alsp_boundary_survival_Schoenfeld(HR, s, events_tot, alpha_2, rand_ratio)

Arguments

HR

Hazard ratio of the test arm vs. the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

events_tot

Total number of events across both the test arm and the control arm

alpha_2

Type I error for the two-sided test, entered for the alpha-spending boundary as the vector of the two-sided alpha-spending values alpha_1, ..., alpha_K at the K analyses; each element must be > 0 and the elements must sum to alpha_2

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

reference

Reference for the sample size formula (Schoenfeld, 1983)

Examples

power_alsp_boundary_survival_Schoenfeld(HR = 0.8, s = c(0.5,1), events_tot = 841,
alpha_2 = c(0.001,0.0499), rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Survival analysis, Non-inferiority trial, Power calculation, Alpha-spending boundary

Description

Group sequential designs / Adaptive sequential designs: Survival analysis, Non-inferiority trial, Power calculation, Alpha-spending boundary

Usage

power_alsp_boundary_survival_Schoenfeld_NI(
  HR,
  margin,
  direction,
  s,
  events_tot,
  alpha,
  rand_ratio
)

Arguments

HR

Hazard ratio of the test arm vs. the control arm; must be > 0

margin

Non-inferiority margin on the hazard ratio scale; must be > 0, with HR > margin required when direction is 1 and HR < margin required otherwise

direction

Test direction: 1 = larger HR is better, otherwise smaller HR is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

events_tot

Total number of events across both the test arm and the control arm

alpha

Type I error for the one-sided test, entered for the alpha-spending boundary as the vector of the one-sided alpha-spending values alpha_1, ..., alpha_K at the K analyses; each element must be > 0 and the elements must sum to alpha

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

reference

Reference for the sample size formula (Schoenfeld, 1983)

Examples

power_alsp_boundary_survival_Schoenfeld_NI(HR = 0.8, margin = 1.1, direction = 1, s = c(0.5,1),
events_tot = 416, alpha = c(0.001,0.024), rand_ratio = 1)


Fixed sample designs: Binary distribution, Superiority trial, Power calculation

Description

Fixed sample designs: Binary distribution, Superiority trial, Power calculation

Usage

power_binary_diff(p_t, p_c, alpha_2, n_control, rand_ratio)

Arguments

p_t

Event rate of the test arm; 0 < p_t < 1

p_c

Event rate of the control arm; 0 < p_c < 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

n_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A numeric value giving the power.

Examples

power_binary_diff(p_t = 0.4, p_c = 0.3, alpha_2 = 0.05, n_control = 53, rand_ratio = 1)


Fixed sample designs: Binary distribution, Non-inferiority trial, Power calculation

Description

Fixed sample designs: Binary distribution, Non-inferiority trial, Power calculation

Usage

power_binary_diff_NI(p_t, p_c, margin, direction, alpha, n_control, rand_ratio)

Arguments

p_t

Event rate of the test arm; 0 < p_t < 1

p_c

Event rate of the control arm; 0 < p_c < 1

margin

Non-inferiority margin; set to 0 for a superiority trial

direction

Test direction: 1 = larger values of the endpoint parameter are better, otherwise smaller values are better

alpha

Type I error for the one-sided test; 0 < alpha < 1

n_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A numeric value giving the power.

Examples

power_binary_diff_NI(p_t = 0.4, p_c = 0.3, margin = 0.1, direction = 0, alpha = 0.025,
n_control = 53, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Binary distribution, Superiority trial, Power calculation, Pocock boundary

Description

Group sequential designs / Adaptive sequential designs: Binary distribution, Superiority trial, Power calculation, Pocock boundary

Usage

power_pocock_boundary_binary_diff(
  p_t,
  p_c,
  s,
  alpha_2,
  sampsz_control,
  rand_ratio
)

Arguments

p_t

Response rate (probability of response) in the test arm; 0 < p_t < 1

p_c

Response rate (probability of response) in the control arm; 0 < p_c < 1

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Examples

power_pocock_boundary_binary_diff(p_t = 0.4, p_c = 0.3, s = c(1/3, 2/3, 1),
alpha_2 = 0.05, sampsz_control = 100, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Binary distribution, Non-inferiority trial, Power calculation, Pocock boundary

Description

Group sequential designs / Adaptive sequential designs: Binary distribution, Non-inferiority trial, Power calculation, Pocock boundary

Usage

power_pocock_boundary_binary_diff_NI(
  p_t,
  p_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio
)

Arguments

p_t

Response rate (probability of response) in the test arm; 0 < p_t < 1

p_c

Response rate (probability of response) in the control arm; 0 < p_c < 1

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Examples

power_pocock_boundary_binary_diff_NI(p_t = 0.4, p_c = 0.3, margin = 0.1, direction = 0,
s = c(1/3, 2/3, 1), alpha = 0.025, sampsz_control = 100, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Superiority trial, Power calculation, Pocock boundary

Description

Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Superiority trial, Power calculation, Pocock boundary

Usage

power_pocock_boundary_neg_binomial(
  r_t,
  r_c,
  s,
  alpha_2,
  sampsz_control,
  rand_ratio,
  nu_t,
  kappa
)

Arguments

r_t

Event rate (mean number of events per unit of exposure time) in the test arm; must be > 0

r_c

Event rate (mean number of events per unit of exposure time) in the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time (follow-up time) of each subject, used to convert the number of events into a rate; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Reference

Reference for the sample size formula (Zhu and Lakkis, 2014)

Examples

power_pocock_boundary_neg_binomial(r_t = c(1.1, 1.1, 1.1), r_c = 1.1, s = c(1/3, 2/3, 1),
alpha_2 = 0.05, sampsz_control = 100, rand_ratio = 1, nu_t = 6, kappa = 1)


Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Non-inferiority trial, Power calculation, Pocock boundary

Description

Group sequential designs / Adaptive sequential designs: Negative binomial distribution, Non-inferiority trial, Power calculation, Pocock boundary

Usage

power_pocock_boundary_neg_binomial_NI(
  r_t,
  r_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio,
  nu_t,
  kappa
)

Arguments

r_t

Event rate (mean number of events per unit of exposure time) in the test arm; must be > 0

r_c

Event rate (mean number of events per unit of exposure time) in the control arm; must be > 0

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger r_t is better, otherwise smaller r_t is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time (follow-up time) of each subject, used to convert the number of events into a rate; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Reference

Reference for the sample size formula (Zhu and Lakkis, 2014)

Examples

power_pocock_boundary_neg_binomial_NI(r_t = c(1.1, 1.1, 1.1), r_c = 1.1, margin = 0.1,
direction = 0, s = c(1/3, 2/3, 1), alpha = 0.025, sampsz_control = 100, rand_ratio = 1,
nu_t = 6, kappa = 1)


Group sequential designs / Adaptive sequential designs: Normal distribution, Superiority trial, Power calculation, Pocock boundary

Description

Group sequential designs / Adaptive sequential designs: Normal distribution, Superiority trial, Power calculation, Pocock boundary

Usage

power_pocock_boundary_normal(
  mu_t,
  mu_c,
  std_t,
  std_c,
  s,
  sampsz_control,
  rand_ratio,
  alpha_2
)

Arguments

mu_t

Mean of the test arm

mu_c

Mean of the control arm

std_t

Standard deviation of the test arm; must be > 0

std_c

Standard deviation of the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Examples

power_pocock_boundary_normal(mu_t = 2.6, mu_c = 0.6, std_t = 9.43, std_c = 9.86,
s = c(1/3, 2/3, 1), sampsz_control = 100, rand_ratio = 1, alpha_2 = 0.05)


Group sequential designs / Adaptive sequential designs: Normal distribution, Non-inferiority trial, Power calculation, Pocock boundary

Description

Group sequential designs / Adaptive sequential designs: Normal distribution, Non-inferiority trial, Power calculation, Pocock boundary

Usage

power_pocock_boundary_normal_NI(
  mu_t,
  mu_c,
  std_t,
  std_c,
  margin,
  direction,
  s,
  sampsz_control,
  rand_ratio,
  alpha
)

Arguments

mu_t

Mean of the test arm

mu_c

Mean of the control arm

std_t

Standard deviation of the test arm; must be > 0

std_c

Standard deviation of the control arm; must be > 0

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

alpha

Type I error for the one-sided test; 0 < alpha < 1

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Examples

power_pocock_boundary_normal_NI(mu_t = 2.6, mu_c = 0.6, std_t = 9.43, std_c = 9.86,
margin = 0.1, direction = 0, s = c(1/3, 2/3, 1), sampsz_control = 100,
rand_ratio = 1, alpha = 0.025)


Group sequential designs / Adaptive sequential designs: Poisson distribution, Superiority trial, Power calculation, Pocock boundary

Description

Group sequential designs / Adaptive sequential designs: Poisson distribution, Superiority trial, Power calculation, Pocock boundary

Usage

power_pocock_boundary_poisson(
  lambda_t,
  lambda_c,
  s,
  alpha_2,
  sampsz_control,
  rand_ratio
)

Arguments

lambda_t

Event rate (mean number of events) in the test arm; must be > 0

lambda_c

Event rate (mean number of events) in the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Examples

power_pocock_boundary_poisson(lambda_t = 1.1, lambda_c = 1.0, s = c(1/3, 2/3, 1),
alpha_2 = 0.05, sampsz_control = 100, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Poisson distribution, Non-inferiority trial, Power calculation, Pocock boundary

Description

Group sequential designs / Adaptive sequential designs: Poisson distribution, Non-inferiority trial, Power calculation, Pocock boundary

Usage

power_pocock_boundary_poisson_NI(
  lambda_t,
  lambda_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio
)

Arguments

lambda_t

Event rate (mean number of events) in the test arm; must be > 0

lambda_c

Event rate (mean number of events) in the control arm; must be > 0

margin

Non-inferiority margin; must be > 0

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

Examples

power_pocock_boundary_poisson_NI(lambda_t = 1.1, lambda_c = 1.0, margin = 0.1, direction = 0,
s = c(1/3, 2/3, 1), alpha = 0.025, sampsz_control = 100, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Survival analysis, Superiority trial, Power calculation, Pocock boundary

Description

Group sequential designs / Adaptive sequential designs: Survival analysis, Superiority trial, Power calculation, Pocock boundary

Usage

power_pocock_boundary_survival_Schoenfeld(
  HR,
  s,
  events_tot,
  alpha_2,
  rand_ratio
)

Arguments

HR

Hazard ratio of the test arm vs. the control arm; must be > 0

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

events_tot

Total number of events across both the test arm and the control arm

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

reference

Reference for the sample size formula (Schoenfeld, 1983)

Examples

power_pocock_boundary_survival_Schoenfeld(HR = 0.7, s = c(1/3, 2/3, 1), events_tot = 100,
alpha_2 = 0.05, rand_ratio = 1)


Group sequential designs / Adaptive sequential designs: Survival analysis, Non-inferiority trial, Power calculation, Pocock boundary

Description

Group sequential designs / Adaptive sequential designs: Survival analysis, Non-inferiority trial, Power calculation, Pocock boundary

Usage

power_pocock_boundary_survival_Schoenfeld_NI(
  HR,
  margin,
  direction,
  s,
  events_tot,
  alpha,
  rand_ratio
)

Arguments

HR

Hazard ratio of the test arm vs. the control arm; must be > 0

margin

Non-inferiority margin on the hazard ratio scale; must be > 0, with HR > margin required when direction is 1 and HR < margin required otherwise

direction

Test direction: 1 = larger HR is better, otherwise smaller HR is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

events_tot

Total number of events across both the test arm and the control arm

alpha

Type I error for the one-sided test; 0 < alpha < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

power

The achieved power

Critical boundaries

Critical boundaries c_1, ..., c_K at the K analyses

1-sided nominal alpha

One-sided nominal alpha at each analysis

1-sided alpha spending

One-sided alpha spending at each analysis

1-sided cummulative alpha

One-sided cumulative alpha spending at each analysis

1-sided sum_nom_alpha

Sum of the one-sided nominal alphas

2-sided nominal alpha

Two-sided nominal alpha at each analysis

2-sided alpha spending

Two-sided alpha spending at each analysis

2-sided cummulative alpha

Two-sided cumulative alpha spending at each analysis

2-sided sum_nom_alpha

Sum of the two-sided nominal alphas

reference

Reference for the sample size formula (Schoenfeld, 1983)

Examples

power_pocock_boundary_survival_Schoenfeld_NI(HR = 0.7, margin = 0.1, direction = 0,
s = c(1/3, 2/3, 1), events_tot = 100, alpha = 0.025, rand_ratio = 1)


Fixed sample designs: Poisson distribution, Superiority trial, Power calculation

Description

Fixed sample designs: Poisson distribution, Superiority trial, Power calculation

Usage

power_two_sample_Poisson(lambda_t, lambda_c, alpha_2, n_control, rand_ratio)

Arguments

lambda_t

Event rate of the test arm under the Poisson model; must be > 0

lambda_c

Event rate of the control arm under the Poisson model; must be > 0

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

n_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A numeric value giving the power.

Examples

power_two_sample_Poisson(lambda_t = 1.1, lambda_c = 1.0, alpha_2 = 0.05,
n_control = 53, rand_ratio = 1)


Fixed sample designs: Poisson distribution, Non-inferiority trial, Power calculation

Description

Fixed sample designs: Poisson distribution, Non-inferiority trial, Power calculation

Usage

power_two_sample_Poisson_NI(
  lambda_t,
  lambda_c,
  margin,
  direction,
  alpha,
  n_control,
  rand_ratio
)

Arguments

lambda_t

Event rate of the test arm under the Poisson model; must be > 0

lambda_c

Event rate of the control arm under the Poisson model; must be > 0

margin

Non-inferiority margin; set to 0 for a superiority trial

direction

Test direction: 1 = larger values of the endpoint parameter are better, otherwise smaller values are better

alpha

Type I error for the one-sided test; 0 < alpha < 1

n_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A numeric value giving the power.

Examples

power_two_sample_Poisson_NI(lambda_t = 1.1, lambda_c = 1.0, margin = 0.1, direction = 0,
alpha = 0.025, n_control = 53, rand_ratio = 1)


Fixed sample designs: Negative binomial distribution, Superiority trial, Power calculation

Description

Fixed sample designs: Negative binomial distribution, Superiority trial, Power calculation

Usage

power_two_sample_neg_binomial(
  r_t,
  r_c,
  alpha_2,
  n_control,
  rand_ratio,
  nu_t,
  kappa
)

Arguments

r_t

Event rate of the test arm for the negative binomial endpoint; must be > 0

r_c

Event rate of the control arm for the negative binomial endpoint; must be > 0

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

n_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time of the test arm; the Poisson part of the variance of the log rate ratio is (1 / nu_t) * (1 / r_c + 1 / (rand_ratio * r_t)), so nu_t must be > 0

kappa

Dispersion parameter of the negative binomial model; adds the over-dispersion term (1 + rand_ratio) * kappa / rand_ratio to the variance of the log rate ratio; must be > 0

Value

A named list with the following components:

power

Power of the two-sided test of r_t = r_c

Reference

Character string giving the reference for the Zhu and Lakkis sample size formula

Examples

power_two_sample_neg_binomial(r_t = c(1.1, 1.1, 1.1), r_c = 1.1, alpha_2 = 0.05,
n_control = 53, rand_ratio = 1, nu_t = 6, kappa = 1)


Fixed sample designs: Negative binomial distribution, Non-inferiority trial, Power calculation

Description

Fixed sample designs: Negative binomial distribution, Non-inferiority trial, Power calculation

Usage

power_two_sample_neg_binomial_NI(
  r_t,
  r_c,
  margin,
  direction,
  alpha,
  n_control,
  rand_ratio,
  nu_t,
  kappa
)

Arguments

r_t

Event rate of the test arm for the negative binomial endpoint; must be > 0

r_c

Event rate of the control arm for the negative binomial endpoint; must be > 0

margin

Non-inferiority margin; set to 0 for a superiority trial

direction

Test direction: 1 = larger values of the endpoint parameter are better, otherwise smaller values are better

alpha

Type I error for the one-sided test; 0 < alpha < 1

n_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time of the test arm; the Poisson part of the variance of the log rate ratio is (1 / nu_t) * (1 / r_c + 1 / (rand_ratio * r_t)), so nu_t must be > 0

kappa

Dispersion parameter of the negative binomial model; adds the over-dispersion term (1 + rand_ratio) * kappa / rand_ratio to the variance of the log rate ratio; must be > 0

Value

A named list with the following components:

power

Power of the non-inferiority test comparing the event rates with the margin

Reference

Character string giving the reference for the Zhu and Lakkis sample size formula

Examples

power_two_sample_neg_binomial_NI(r_t = c(1.1, 1.1, 1.1), r_c = 1.1, margin = 0.1, direction = 0,
alpha = 0.025, n_control = 53, rand_ratio = 1, nu_t = 6, kappa = 1)


Fixed sample designs: Normal distribution, Superiority trial, Power calculation

Description

Fixed sample designs: Normal distribution, Superiority trial, Power calculation

Usage

power_two_sample_normal(
  mu_t,
  mu_c,
  sigma_t,
  sigma_c,
  alpha_2,
  n_control,
  rand_ratio
)

Arguments

mu_t

Mean of the test arm

mu_c

Mean of the control arm

sigma_t

Standard deviation of the test arm; must be > 0

sigma_c

Standard deviation of the control arm; must be > 0

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

n_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A numeric value giving the power.

Examples

power_two_sample_normal(mu_t = 2.6, mu_c = 0.6, sigma_t = 9.43, sigma_c = 9.86,
alpha_2 = 0.05, n_control = 53, rand_ratio = 1)


Fixed sample designs: Normal distribution, Non-inferiority trial, Power calculation

Description

Fixed sample designs: Normal distribution, Non-inferiority trial, Power calculation

Usage

power_two_sample_normal_NI(
  mu_t,
  mu_c,
  sigma_t,
  sigma_c,
  margin,
  direction,
  alpha,
  n_control,
  rand_ratio
)

Arguments

mu_t

Mean of the test arm

mu_c

Mean of the control arm

sigma_t

Standard deviation of the test arm; must be > 0

sigma_c

Standard deviation of the control arm; must be > 0

margin

Non-inferiority margin; set to 0 for a superiority trial

direction

Test direction: 1 = larger values of the endpoint parameter are better, otherwise smaller values are better

alpha

Type I error for the one-sided test; 0 < alpha < 1

n_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A numeric value giving the power.

Examples

power_two_sample_normal_NI( mu_t = 2.6, mu_c = 0.6, sigma_t = 9.43, sigma_c = 9.86,
  margin = 0.1, direction = 1, alpha = 0.025, n_control = 53, rand_ratio = 1)


Fixed sample designs: Survival analysis, Superiority trial, Power calculation

Description

Fixed sample designs: Survival analysis, Superiority trial, Power calculation

Usage

power_two_sample_surv_Schoenfeld(HR, alpha_2, event_tot, rand_ratio)

Arguments

HR

Hazards ratio of test arm vs. the control arm; must be > 0

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

event_tot

Total number of events across both arms

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

Power

Power of the two-sided test of HR = 1

Reference

Character string giving the reference for the Schoenfeld sample size formula

Examples

power_two_sample_surv_Schoenfeld(HR = 0.7, alpha_2 = 0.05, event_tot = 100, rand_ratio = 1)


Fixed sample designs: Survival analysis, Non-inferiority trial, Power calculation

Description

Fixed sample designs: Survival analysis, Non-inferiority trial, Power calculation

Usage

power_two_sample_surv_Schoenfeld_NI(
  HR,
  margin,
  direction,
  alpha,
  event_tot,
  rand_ratio
)

Arguments

HR

Hazards ratio of test arm vs. the control arm; must be > 0

margin

Non-inferiority margin; set to 0 for a superiority trial

direction

Test direction: 1 = larger values of the endpoint parameter are better, otherwise smaller values are better

alpha

Type I error for the one-sided test; 0 < alpha < 1

event_tot

Total number of events across both arms

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

Power

Power of the non-inferiority test comparing the hazard ratio with the margin

Reference

Character string giving the reference for the Schoenfeld sample size formula

Examples

power_two_sample_surv_Schoenfeld_NI(HR = 0.7, margin = 0.1, direction = 0, alpha = 0.025,
event_tot = 100, rand_ratio = 1)


Print method for a Simon's two-stage phase II design

Description

Print method for a Simon's two-stage phase II design

Usage

## S3 method for class 'ph2simon'
print(x, ...)

Arguments

x

An object of class 'ph2simon', as returned by the internal 'ph2simon' helper

...

Further arguments passed to 'print'

Value

'NULL', invisibly, or the warning message, invisibly, if the optimal sample size is too close to 'nmax'. Called for the side effect of printing the optimal and minimax designs.


Fixed sample designs: Binary distribution, Superiority trial, Sample size calculation

Description

Fixed sample designs: Binary distribution, Superiority trial, Sample size calculation

Usage

sample_size_binary_diff(p_t, p_c, alpha_2, beta, rand_ratio)

Arguments

p_t

Event rate of the test arm; 0 < p_t < 1

p_c

Event rate of the control arm; 0 < p_c < 1

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

beta

Type II error rate, i.e. 1 - power

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

Sample size for control arm

Sample size required for the control arm

sample size for experimental arm

Sample size required for the experimental (test) arm

Examples

sample_size_binary_diff(p_t = 0.2, p_c = 0.4, alpha_2 = 0.05, beta = 0.1, rand_ratio = 1)


Fixed sample designs: Binary distribution, Non-inferiority trial, Sample size calculation

Description

Fixed sample designs: Binary distribution, Non-inferiority trial, Sample size calculation

Usage

sample_size_binary_diff_NI(
  p_t,
  p_c,
  margin,
  direction,
  alpha,
  beta,
  rand_ratio
)

Arguments

p_t

Event rate of the test arm; 0 < p_t < 1

p_c

Event rate of the control arm; 0 < p_c < 1

margin

Non-inferiority margin; set to 0 for a superiority trial

direction

Test direction: 1 = larger values of the endpoint parameter are better, otherwise smaller values are better

alpha

Type I error for the one-sided test; 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

Sample size for control arm

Sample size required for the control arm

sample size for experimental arm

Sample size required for the experimental (test) arm

Examples

sample_size_binary_diff_NI( p_t = 0.4, p_c = 0.3, margin = 0.1, direction = 1, alpha = 0.025,
  beta = 0.1, rand_ratio = 1)


Fixed sample designs: Negative binomial distribution, Superiority trial, Sample size calculation

Description

Fixed sample designs: Negative binomial distribution, Superiority trial, Sample size calculation

Usage

sample_size_neg_binomial(r_t, r_c, alpha_2, beta, rand_ratio, nu_t, kappa)

Arguments

r_t

Event rate of the test arm for the negative binomial endpoint; must be > 0

r_c

Event rate of the control arm for the negative binomial endpoint; must be > 0

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

beta

Type II error rate, i.e. 1 - power

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time of the test arm; the Poisson part of the variance of the log rate ratio is (1 / nu_t) * (1 / r_c + 1 / (rand_ratio * r_t)), so nu_t must be > 0

kappa

Dispersion parameter of the negative binomial model; adds the over-dispersion term (1 + rand_ratio) * kappa / rand_ratio to the variance of the log rate ratio; must be > 0

Value

A named list with the following components:

Standardized effect size

Standardized effect size, i.e. the absolute log rate ratio divided by the square root of the variance

Sample size for test arm

Sample size required for the test (experimental) arm

Sample size for control arm

Sample size required for the control arm

Reference

Character string giving the reference for the Zhu and Lakkis sample size formula

Examples

sample_size_neg_binomial(r_t = 0.85, r_c = 1.25, alpha_2 = 0.05, beta = 0.2, rand_ratio = 1,
nu_t = 1, kappa = 1)


Fixed sample designs: Negative binomial distribution, Non-inferiority trial, Sample size calculation

Description

Fixed sample designs: Negative binomial distribution, Non-inferiority trial, Sample size calculation

Usage

sample_size_neg_binomial_NI(
  r_t,
  r_c,
  margin,
  direction,
  alpha,
  beta,
  rand_ratio,
  nu_t,
  kappa
)

Arguments

r_t

Event rate of the test arm for the negative binomial endpoint; must be > 0

r_c

Event rate of the control arm for the negative binomial endpoint; must be > 0

margin

Non-inferiority margin; set to 0 for a superiority trial

direction

Test direction: 1 = larger values of the endpoint parameter are better, otherwise smaller values are better

alpha

Type I error for the one-sided test; 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time of the test arm; the Poisson part of the variance of the log rate ratio is (1 / nu_t) * (1 / r_c + 1 / (rand_ratio * r_t)), so nu_t must be > 0

kappa

Dispersion parameter of the negative binomial model; adds the over-dispersion term (1 + rand_ratio) * kappa / rand_ratio to the variance of the log rate ratio; must be > 0

Value

A named list with the following components:

Standardized effect size

Standardized effect size, i.e. the absolute log rate ratio divided by the square root of the variance

Sample size for test arm

Sample size required for the test (experimental) arm

Sample size for control arm

Sample size required for the control arm

Reference

Character string giving the reference for the Zhu and Lakkis sample size formula

Examples

sample_size_neg_binomial_NI(r_t = 0.9, r_c = 1, margin = 0.3, direction = 1, alpha = 0.025,
beta = 0.1, rand_ratio = 1, nu_t = 1, kappa = 1)


Fixed sample designs: Poisson distribution, Superiority trial, Sample size calculation

Description

Fixed sample designs: Poisson distribution, Superiority trial, Sample size calculation

Usage

sample_size_two_sample_Poisson(lambda_t, lambda_c, alpha_2, beta, rand_ratio)

Arguments

lambda_t

Event rate of the test arm under the Poisson model; must be > 0

lambda_c

Event rate of the control arm under the Poisson model; must be > 0

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

beta

Type II error rate, i.e. 1 - power

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

Sample size for experimental arm

Sample size required for the experimental (test) arm

Sample size for control arm

Sample size required for the control arm

Examples

sample_size_two_sample_Poisson(lambda_t = 1.1, lambda_c = 1.0, alpha_2 = 0.05,
beta = 0.1, rand_ratio = 1)


Fixed sample designs: Poisson distribution, Non-inferiority trial, Sample size calculation

Description

Fixed sample designs: Poisson distribution, Non-inferiority trial, Sample size calculation

Usage

sample_size_two_sample_Poisson_NI(
  lambda_t,
  lambda_c,
  margin,
  direction,
  alpha,
  beta,
  rand_ratio
)

Arguments

lambda_t

Event rate of the test arm under the Poisson model; must be > 0

lambda_c

Event rate of the control arm under the Poisson model; must be > 0

margin

Non-inferiority margin; set to 0 for a superiority trial

direction

Test direction: 1 = larger values of the endpoint parameter are better, otherwise smaller values are better

alpha

Type I error for the one-sided test; 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

Sample size for experimental arm

Sample size required for the experimental (test) arm

Sample size for control arm

Sample size required for the control arm

Examples

sample_size_two_sample_Poisson_NI( lambda_t = 1.1, lambda_c = 1.0, margin = 0.1, direction = 1,
  alpha = 0.025, beta = 0.1, rand_ratio = 1)


Fixed sample designs: Normal distribution, Superiority trial, Sample size calculation

Description

Fixed sample designs: Normal distribution, Superiority trial, Sample size calculation

Usage

sample_size_two_sample_normal(
  mu_t,
  mu_c,
  sigma_t,
  sigma_c,
  alpha_2,
  beta,
  rand_ratio
)

Arguments

mu_t

Mean of the test arm

mu_c

Mean of the control arm

sigma_t

Standard deviation of the test arm; must be > 0

sigma_c

Standard deviation of the control arm; must be > 0

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

beta

Type II error rate, i.e. 1 - power

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

Sample size for control arm

Sample size required for the control arm

Sample size for test arm

Sample size required for the test arm

Examples

sample_size_two_sample_normal(mu_t = 2, mu_c = 0, sigma_t = 9.79, sigma_c = 9.79,
alpha_2 = 0.05, beta = 0.2, rand_ratio = 1)


Fixed sample designs: Normal distribution, Non-inferiority trial, Sample size calculation

Description

Fixed sample designs: Normal distribution, Non-inferiority trial, Sample size calculation

Usage

sample_size_two_sample_normal_NI(
  mu_t,
  mu_c,
  sigma_t,
  sigma_c,
  margin,
  direction,
  alpha,
  beta,
  rand_ratio
)

Arguments

mu_t

Mean of the test arm

mu_c

Mean of the control arm

sigma_t

Standard deviation of the test arm; must be > 0

sigma_c

Standard deviation of the control arm; must be > 0

margin

Non-inferiority margin; set to 0 for a superiority trial

direction

Test direction: 1 = larger values of the endpoint parameter are better, otherwise smaller values are better

alpha

Type I error for the one-sided test; 0 < alpha < 1

beta

Type II error rate, i.e. 1 - power

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

Sample size for control arm

Sample size required for the control arm

Sample size for test arm

Sample size required for the test arm

Examples

sample_size_two_sample_normal_NI(mu_t = 2, mu_c = 2.5, sigma_t = 9.79, sigma_c = 9.79,
margin = 0.2, direction = 2, alpha = 0.05, beta = 0.2, rand_ratio = 1)


Fixed sample designs: Survival analysis, Superiority trial, Sample size calculation

Description

Fixed sample designs: Survival analysis, Superiority trial, Sample size calculation

Usage

sample_size_two_sample_surv_Schoenfeld(HR, alpha_2, beta, rand_ratio)

Arguments

HR

Hazards ratio of test arm vs. the control arm; must be > 0

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

beta

Type II error rate, i.e. 1 - power

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

Total number of events

Total number of events required for the two-arm comparison

Reference

Character string giving the reference for the Schoenfeld sample size formula

Examples

sample_size_two_sample_surv_Schoenfeld(HR = 0.7, alpha_2 = 0.05, beta = 0.1, rand_ratio = 1)


Fixed sample designs: Survival analysis, Non-inferiority trial, Sample size calculation

Description

Fixed sample designs: Survival analysis, Non-inferiority trial, Sample size calculation

Usage

sample_size_two_sample_surv_Schoenfeld_NI(
  HR,
  margin,
  direction,
  alpha_2,
  beta,
  rand_ratio
)

Arguments

HR

Hazards ratio of test arm vs. the control arm; must be > 0

margin

Non-inferiority margin; set to 0 for a superiority trial

direction

Test direction: 1 = larger values of the endpoint parameter are better, otherwise smaller values are better

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

beta

Type II error rate, i.e. 1 - power

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

Value

A named list with the following components:

Total number of events

Total number of events required for the two-arm comparison

Reference

Character string giving the reference for the Schoenfeld sample size formula

Examples

sample_size_two_sample_surv_Schoenfeld_NI( HR = 0.7, margin = 0.1, direction = 1,
  alpha_2 = 0.05, beta = 0.1, rand_ratio = 1)


Single arm phase 2 oncology trial: Two-stage design, Simon's design

Description

Single arm phase 2 oncology trial: Two-stage design, Simon's design

Usage

simon_ph2_sz(alpha, beta, p_0, p_1)

Arguments

alpha

Type I error for the one-sided test

beta

Type II error rate, i.e. 1 - power

p_0

Response rate indicating low activity with insufficient clinical benefit

p_1

Assumed response rate

Value

A matrix with one row for each of the minimax design (smallest n_2), the optimal design (smallest EN(p_0)) and the average design (an augmentation of the original Simon's design, Gao and Zhang 2024), and one column per design quantity:

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)

Expected sample size under the null hypothesis

PET(p_0)

Probability of early termination under the null hypothesis

t1_err

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

PET_p_1

Probability of early termination under p = p_1

power_p_1

Power under p = 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.

Examples

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


Phase 2/3 seamless combination Group sequential design: Binary distribution, Sample size calculation, O'Brien-Fleming boundary

Description

Phase 2/3 seamless combination Group sequential design: Binary distribution, Sample size calculation, O'Brien-Fleming boundary

Usage

two_stage_Sample_size_OF_boundary_binary_diff(
  p_t,
  p_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  dist1,
  dist2
)

Arguments

p_t

Event rates of the test arms; a vector of length >= 2 with 0 < p_t < 1

p_c

Event rate of the common control arm; 0 < p_c < 1

margin

Non-inferiority margin; margin >= 0, with margin = 0 for a superiority trial and margin > 0 for a non-inferiority trial

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1, typically 0.025

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

First-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

dist2

Second-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

sample size for each dose in a two arm study with same critical boudary

Sample size for each dose in a two-arm study using the same critical boundary

sample size for control arm in a two arm study with same critical boudary

Sample size for the control arm in a two-arm study using the same critical boundary

type I error control

Nested list with the two-stage critical boundaries, the one-sided alpha spending, nominal alpha and cumulative alpha at each interim analysis, and the phase 3 information fraction, phase 3 critical boundary and nominal p-value for phase 3

exit probabilities

Nested list with the selection probability for each mu, the exit probability for each mu, the total phase 2 probability, the total exit probability and the conditional exit probability given the selected mu

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


two_stage_Sample_size_OF_boundary_binary_diff( p_t = c(0.2,0.3,0.4), p_c = 0.5, margin = 0,
  direction = 2, s = c(1/3,2/3,1), alpha = 0.025, beta = 0.1, rand_ratio = 1, dist1 = 1,
  dist2 = 1)



Phase 2/3 seamless combination Group sequential design: Negative binomial distribution, Sample size calculation, O'Brien-Fleming boundary

Description

Phase 2/3 seamless combination Group sequential design: Negative binomial distribution, Sample size calculation, O'Brien-Fleming boundary

Usage

two_stage_Sample_size_OF_boundary_neg_binomial(
  r_t,
  r_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  nu_t,
  kappa,
  dist1,
  dist2
)

Arguments

r_t

Mean event rates of the test arms; a vector of length >= 2

r_c

Mean event rate of the common control arm

margin

Non-inferiority margin; margin >= 0, with margin = 0 for a superiority trial and margin > 0 for a non-inferiority trial

direction

Test direction: 1 = larger r is better, otherwise smaller r is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1, typically 0.025

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

dist1

First-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, 2 = otherwise

dist2

Second-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, 2 = otherwise

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

sample size for each dose in a two arm study with same critical boudary

Sample size for each dose in a two-arm study using the same critical boundary

sample size for control arm in a two arm study with same critical boudary

Sample size for the control arm in a two-arm study using the same critical boundary

type I error control

Nested list with the two-stage critical boundaries, the one-sided alpha spending, nominal alpha and cumulative alpha at each interim analysis, and the phase 3 information fraction, phase 3 critical boundary and nominal p-value for phase 3

exit probabilities

Nested list with the selection probability for each mu, the exit probability for each mu, the total phase 2 probability, the total exit probability and the conditional exit probability given the selected mu

Reference

Reference for the negative binomial sample size formula used

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


two_stage_Sample_size_OF_boundary_neg_binomial(r_t = c(1.1, 1.1, 1.1), r_c = 1.1, margin = 0.1,
direction = 0, s = c(1/3, 2/3, 1), alpha = 0.025, beta = 0.1, rand_ratio = 1, nu_t = 6,
kappa = 1, dist1 = 1, dist2 = 1)



Phase 2/3 seamless combination Group sequential design: Normal distribution, Sample size calculation, O'Brien-Fleming boundary

Description

Phase 2/3 seamless combination Group sequential design: Normal distribution, Sample size calculation, O'Brien-Fleming boundary

Usage

two_stage_Sample_size_OF_boundary_normal(
  mu_t,
  mu_c,
  std_t,
  std_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  dist1,
  dist2
)

Arguments

mu_t

Means of the test arms; a vector of length >= 2. The largest implied mean effect must be > 1e-4, otherwise the function returns NA

mu_c

Mean of the common control arm

std_t

Common standard deviation of the test arms; must be > 0

std_c

Standard deviation of the control arm; must be > 0

margin

Non-inferiority margin; margin >= 0, with margin = 0 for a superiority trial and margin > 0 for a non-inferiority trial

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1, typically 0.025

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

First-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

dist2

Second-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

sample size for each dose in a two arm study with same critical boudary

Sample size for each dose in a two-arm study using the same critical boundary

sample size for control arm in a two arm study with same critical boudary

Sample size for the control arm in a two-arm study using the same critical boundary

type I error control

Nested list with the two-stage critical boundaries, the one-sided alpha spending, nominal alpha and cumulative alpha at each interim analysis, and the phase 3 information fraction, phase 3 critical boundary and nominal p-value for phase 3

exit probabilities

Nested list with the selection probability for each mu, the exit probability for each mu, the total phase 2 probability, the total exit probability and the conditional exit probability given the selected mu

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


two_stage_Sample_size_OF_boundary_normal( mu_t = c(0.2,0.3,0.4), mu_c = 0, std_t = 1, std_c = 1,
  margin = 0.1, direction = 1, s = c(1/3,2/3,1), alpha = 0.025, beta = 0.1, rand_ratio = 1,
  dist1 = 1, dist2 = 1)



Phase 2/3 seamless combination Group sequential design: Poisson distribution, Sample size calculation, O'Brien-Fleming boundary

Description

Phase 2/3 seamless combination Group sequential design: Poisson distribution, Sample size calculation, O'Brien-Fleming boundary

Usage

two_stage_Sample_size_OF_boundary_poisson(
  lambda_t,
  lambda_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  dist1,
  dist2
)

Arguments

lambda_t

Mean event rates of the test arms; a vector of length >= 2

lambda_c

Mean event rate of the common control arm

margin

Non-inferiority margin; margin >= 0, with margin = 0 for a superiority trial and margin > 0 for a non-inferiority trial

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1, typically 0.025

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

First-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

dist2

Second-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

sample size for each dose in a two arm study with same critical boudary

Sample size for each dose in a two-arm study using the same critical boundary

sample size for control arm in a two arm study with same critical boudary

Sample size for the control arm in a two-arm study using the same critical boundary

type I error control

Nested list with the two-stage critical boundaries, the one-sided alpha spending, nominal alpha and cumulative alpha at each interim analysis, and the phase 3 information fraction, phase 3 critical boundary and nominal p-value for phase 3

exit probabilities

Nested list with the selection probability for each mu, the exit probability for each mu, the total phase 2 probability, the total exit probability and the conditional exit probability given the selected mu

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


two_stage_Sample_size_OF_boundary_poisson( lambda_t = c(0.2,0.3,0.4), lambda_c = 0.5,
  margin = 0.15, direction = 2, s = c(1/3,2/3,1), alpha = 0.025, beta = 0.1, rand_ratio = 1,
  dist1 = 1, dist2 = 1)



Phase 2/3 seamless combination Group sequential design: Survival analysis, Sample size calculation, O'Brien-Fleming boundary

Description

Phase 2/3 seamless combination Group sequential design: Survival analysis, Sample size calculation, O'Brien-Fleming boundary

Usage

two_stage_Sample_size_OF_boundary_survival_Schoenfeld(
  HR,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  dist1,
  dist2
)

Arguments

HR

Hazard ratios of the test arms vs. the control arm; a vector of length >= 2

margin

Non-inferiority margin for the hazard ratio; must be > 0, with margin = 1 for a superiority trial and margin != 1 for a non-inferiority trial

direction

Test direction: 1 = larger HR is better, otherwise smaller HR is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1, typically 0.025

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

Distribution indicator for the first stage: 2 for this survival endpoint setting (this is conservative)

dist2

Distribution indicator for the second stage: 1 for this survival endpoint setting (this is conservative)

Value

A named list with the following components:

Combined number of events between a dose and control

Number of events required for a single dose compared with the control

total number of events from all doses and control

Total number of events required for all doses and the control

combined number of events in each dose and control in a two arm study with same critical boudary

Number of events for each dose and the control in a two-arm study using the same critical boundary

type I error control

Nested list with the two-stage critical boundaries, the one-sided alpha spending, nominal alpha and cumulative alpha at each interim analysis, and the phase 3 information fraction, phase 3 critical boundary and nominal p-value for phase 3

exit probabilities

Nested list with the selection probability for each HR, the exit probability for each HR, the total phase 2 probability, the total exit probability and the conditional exit probability given the selected HR

reference

Reference for the Schoenfeld sample size formula used

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


two_stage_Sample_size_OF_boundary_survival_Schoenfeld( HR = c(1.1,1.2,1.25), margin = 1,
  direction = 1, s = c(0.3,0.7,1), alpha = 0.025, beta = 0.1, rand_ratio = 1, dist1 = 2,
  dist2 = 1)



Phase 2/3 seamless combination Group sequential design: Binary distribution, Sample size calculation, Alpha-spending boundary

Description

Phase 2/3 seamless combination Group sequential design: Binary distribution, Sample size calculation, Alpha-spending boundary

Usage

two_stage_Sample_size_alsp_boundary_binary_diff(
  p_t,
  p_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  dist1,
  dist2
)

Arguments

p_t

Event rates of the test arms; a vector of length >= 2 with 0 < p_t < 1

p_c

Event rate of the common control arm; 0 < p_c < 1

margin

Non-inferiority margin; margin >= 0, with margin = 0 for a superiority trial and margin > 0 for a non-inferiority trial

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; for the alpha-spending boundary this is the vector of alpha-spending values at each analysis, with one value per element of s and the values summing to the overall one-sided type I error, e.g. c(0.001, 0.001, 0.023)

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

First-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

dist2

Second-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

sample size for each dose in a two arm study with same critical boudary

Sample size for each dose in a two-arm study using the same critical boundary

sample size for control arm in a two arm study with same critical boudary

Sample size for the control arm in a two-arm study using the same critical boundary

type I error control

Nested list with the two-stage critical boundaries, the one-sided alpha spending, nominal alpha and cumulative alpha at each interim analysis, and the phase 3 information fraction, phase 3 critical boundary and nominal p-value for phase 3

exit probabilities

Nested list with the selection probability for each mu, the exit probability for each mu, the total phase 2 probability, the total exit probability and the conditional exit probability given the selected mu

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


two_stage_Sample_size_alsp_boundary_binary_diff( p_t = c(0.2,0.3,0.4), p_c = 0.5, margin = 0.15,
  direction = 2, s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023), beta = 0.1, rand_ratio = 1,
  dist1 = 1, dist2 = 1)



Phase 2/3 seamless combination Group sequential design: Negative binomial distribution, Sample size calculation, Alpha-spending boundary

Description

Phase 2/3 seamless combination Group sequential design: Negative binomial distribution, Sample size calculation, Alpha-spending boundary

Usage

two_stage_Sample_size_alsp_boundary_neg_binomial(
  r_t,
  r_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  nu_t,
  kappa,
  dist1,
  dist2
)

Arguments

r_t

Mean event rates of the test arms; a vector of length >= 2

r_c

Mean event rate of the common control arm

margin

Non-inferiority margin; margin >= 0, with margin = 0 for a superiority trial and margin > 0 for a non-inferiority trial

direction

Test direction: 1 = larger r is better, otherwise smaller r is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; for the alpha-spending boundary this is the vector of alpha-spending values at each analysis, with one value per element of s and the values summing to the overall one-sided type I error, e.g. c(0.001, 0.001, 0.023)

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

dist1

First-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, 2 = otherwise

dist2

Second-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, 2 = otherwise

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

sample size for each dose in a two arm study with same critical boudary

Sample size for each dose in a two-arm study using the same critical boundary

sample size for control arm in a two arm study with same critical boudary

Sample size for the control arm in a two-arm study using the same critical boundary

type I error control

Nested list with the two-stage critical boundaries, the one-sided alpha spending, nominal alpha and cumulative alpha at each interim analysis, and the phase 3 information fraction, phase 3 critical boundary and nominal p-value for phase 3

exit probabilities

Nested list with the selection probability for each mu, the exit probability for each mu, the total phase 2 probability, the total exit probability and the conditional exit probability given the selected mu

Reference

Reference for the negative binomial sample size formula used

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


two_stage_Sample_size_alsp_boundary_neg_binomial( r_t = c(0.2,0.3,0.4), r_c = 0.6, margin = 0.1,
  direction = 2, s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023), beta = 0.1, rand_ratio = 1,
  nu_t = 1, kappa = 1, dist1 = 1, dist2 = 1)



Phase 2/3 seamless combination Group sequential design: Normal distribution, Sample size calculation, Alpha-spending boundary

Description

Phase 2/3 seamless combination Group sequential design: Normal distribution, Sample size calculation, Alpha-spending boundary

Usage

two_stage_Sample_size_alsp_boundary_normal(
  mu_t,
  mu_c,
  std_t,
  std_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  dist1,
  dist2
)

Arguments

mu_t

Means of the test arms; a vector of length >= 2. The largest implied mean effect must be > 1e-4, otherwise the function returns NA

mu_c

Mean of the common control arm

std_t

Common standard deviation of the test arms; must be > 0

std_c

Standard deviation of the control arm; must be > 0

margin

Non-inferiority margin; margin >= 0, with margin = 0 for a superiority trial and margin > 0 for a non-inferiority trial

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; for the alpha-spending boundary this is the vector of alpha-spending values at each analysis, with one value per element of s and the values summing to the overall one-sided type I error, e.g. c(0.001, 0.001, 0.023)

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

First-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

dist2

Second-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

sample size for each dose in a two arm study with same critical boudary

Sample size for each dose in a two-arm study using the same critical boundary

sample size for control arm in a two arm study with same critical boudary

Sample size for the control arm in a two-arm study using the same critical boundary

type I error control

Nested list with the two-stage critical boundaries, the one-sided alpha spending, nominal alpha and cumulative alpha at each interim analysis, and the phase 3 information fraction, phase 3 critical boundary and nominal p-value for phase 3

exit probabilities

Nested list with the selection probability for each mu, the exit probability for each mu, the total phase 2 probability, the total exit probability and the conditional exit probability given the selected mu

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


two_stage_Sample_size_alsp_boundary_normal( mu_t = c(0.2,0.3,0.4), mu_c = 0, std_t = 1,
  std_c = 1, margin = 0.1, direction = 1, s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023),
  beta = 0.1, rand_ratio = 1, dist1 = 1, dist2 = 1)



Phase 2/3 seamless combination Group sequential design: Poisson distribution, Sample size calculation, Alpha-spending boundary

Description

Phase 2/3 seamless combination Group sequential design: Poisson distribution, Sample size calculation, Alpha-spending boundary

Usage

two_stage_Sample_size_alsp_boundary_poisson(
  lambda_t,
  lambda_c,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  dist1,
  dist2
)

Arguments

lambda_t

Mean event rates of the test arms; a vector of length >= 2

lambda_c

Mean event rate of the common control arm

margin

Non-inferiority margin; margin >= 0, with margin = 0 for a superiority trial and margin > 0 for a non-inferiority trial

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; for the alpha-spending boundary this is the vector of alpha-spending values at each analysis, with one value per element of s and the values summing to the overall one-sided type I error, e.g. c(0.001, 0.001, 0.023)

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

First-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

dist2

Second-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

Value

A named list with the following components:

test arm sample size

Sample size required for the test arm

control arm sample size

Sample size required for the control arm

sample size for each dose in a two arm study with same critical boudary

Sample size for each dose in a two-arm study using the same critical boundary

sample size for control arm in a two arm study with same critical boudary

Sample size for the control arm in a two-arm study using the same critical boundary

type I error control

Nested list with the two-stage critical boundaries, the one-sided alpha spending, nominal alpha and cumulative alpha at each interim analysis, and the phase 3 information fraction, phase 3 critical boundary and nominal p-value for phase 3

exit probabilities

Nested list with the selection probability for each mu, the exit probability for each mu, the total phase 2 probability, the total exit probability and the conditional exit probability given the selected mu

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


two_stage_Sample_size_alsp_boundary_poisson( lambda_t = c(0.2,0.3,0.4), lambda_c = 0.5,
  margin = 0.3, direction = 2, s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023), beta = 0.1,
  rand_ratio = 1, dist1 = 1, dist2 = 1)



Phase 2/3 seamless combination Group sequential design: Survival analysis, Sample size calculation, Alpha-spending boundary

Description

Phase 2/3 seamless combination Group sequential design: Survival analysis, Sample size calculation, Alpha-spending boundary

Usage

two_stage_Sample_size_alsp_boundary_survival_Schoenfeld(
  HR,
  margin,
  direction,
  s,
  alpha,
  beta,
  rand_ratio,
  dist1,
  dist2
)

Arguments

HR

Hazard ratios of the test arms vs. the control arm; a vector of length >= 2

margin

Non-inferiority margin for the hazard ratio; must be > 0, with margin = 1 for a superiority trial and margin != 1 for a non-inferiority trial

direction

Test direction: 1 = larger HR is better, otherwise smaller HR is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; for the alpha-spending boundary this is the vector of alpha-spending values at each analysis, with one value per element of s and the values summing to the overall one-sided type I error, e.g. c(0.001, 0.001, 0.023)

beta

Type II error rate, i.e. 1 - power; 0 < beta < 1

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

Distribution indicator for the first stage: 2 for this survival endpoint setting (this is conservative)

dist2

Distribution indicator for the second stage: 1 for this survival endpoint setting (this is conservative)

Value

A named list with the following components:

Combined number of events between a dose and control

Number of events required for a single dose compared with the control

total number of events from all doses and control

Total number of events required for all doses and the control

combined number of events in each dose and control in a two arm study with same critical boudary

Number of events for each dose and the control in a two-arm study using the same critical boundary

type I error control

Nested list with the two-stage critical boundaries, the one-sided alpha spending, nominal alpha and cumulative alpha at each interim analysis, and the phase 3 information fraction, phase 3 critical boundary and nominal p-value for phase 3

exit probabilities

Nested list with the selection probability for each HR, the exit probability for each HR, the total phase 2 probability, the total exit probability and the conditional exit probability given the selected HR

reference

Reference for the Schoenfeld sample size formula used

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples


two_stage_Sample_size_alsp_boundary_survival_Schoenfeld( HR = c(0.2,0.3,0.4), margin = 1.1,
  direction = 2, s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023), beta = 0.1, rand_ratio = 1,
  dist1 = 1, dist2 = 1)



Phase 2/3 seamless combination Group sequential design: Final analysis, Without sample size change, last_vt == 1

Description

Phase 2/3 seamless combination Group sequential design: Final analysis, Without sample size change, last_vt == 1

Usage

two_stage_ci_0(s, theta_hat_0, theta_hat_0_sd, alpha_2, dist)

Arguments

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

theta_hat_0

Vector of naive point estimates of the treatment effect for the comparisons at the end of the phase 2 stage (the first interim analysis); its length is the number of comparisons

theta_hat_0_sd

Common standard error of 'theta_hat_0' at the end of the phase 2 stage, shared by all comparisons; must be > 0

alpha_2

Type I error for the two-sided test

dist

Distribution indicator of the endpoint: 1 = the endpoint is normally distributed and the comparison is between multiple doses and a common control, otherwise the non-normal branch is used

Value

A named list with the following components:

p-value

The p-value for the hypothesis test

confidence interval

Numeric vector of length 3 giving the lower confidence limit, the median unbiased point estimate and the upper confidence limit; the lower limit is consistent with the p-value

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stage_ci_0(s = c(1/3, 2/3, 1), theta_hat_0 = 0.2, theta_hat_0_sd = 0.5,
alpha_2 = 0.05, dist = 1)


Phase 2/3 seamless combination Group sequential design: Final analysis, Without sample size change, last_vt > 1

Description

Phase 2/3 seamless combination Group sequential design: Final analysis, Without sample size change, last_vt > 1

Usage

two_stage_ci_1(
  s,
  c_bry_two_stg,
  c_bry_p3,
  comp,
  theta_hat_p3,
  theta_hat_p3_sd,
  theta_hat_last,
  theta_hat_last_sd,
  last_vt,
  alpha_2,
  dist
)

Arguments

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1; here the length of 's' must be 2 or 3, i.e. the phase 2 stage plus one or two phase 3 analyses

c_bry_two_stg

Vector of critical boundaries of the two-stage design for the overall test, one per analysis; must have the same length as 's'

c_bry_p3

Vector of critical boundaries of the prior (phase 3) study, one per phase 3 analysis; must have 'length(s) - 1' elements

comp

Number of comparisons in the phase 2 stage, e.g. the number of doses or the number of endpoints; must be at least 2

theta_hat_p3

Treatment effect estimate observed at the analysis at which the trial stopped, using phase 3 data only

theta_hat_p3_sd

Standard error of 'theta_hat_p3'; must be > 0

theta_hat_last

Treatment effect estimate observed at the analysis at which the trial stopped, based on all data accumulated by then

theta_hat_last_sd

Standard error of 'theta_hat_last'; must be > 0

last_vt

Index of the analysis at which the trial stopped; must be > 1 because the trial stopped in the phase 3 stage

alpha_2

Type I error for the two-sided test

dist

Distribution indicator of the endpoint: 1 = the endpoint is normally distributed and the comparison is between multiple doses and a common control, otherwise the non-normal branch is used

Value

A named list with the following components:

p-value

The p-value for the hypothesis test

confidence interval

Numeric vector of length 3 giving the lower confidence limit, the median unbiased point estimate and the upper confidence limit; the lower limit is consistent with the p-value, while the point estimate and the upper limit use phase 3 data only

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stage_ci_1(s = c(1/3,2/3,1), c_bry_two_stg = c(3.938325, 2.784816,2.273793),
c_bry_p3 = c(3.954862,1.977431), comp = 3, theta_hat_p3 = 0.45, theta_hat_p3_sd = 0.6,
theta_hat_last = 2.784816*0.12, theta_hat_last_sd = 0.12, last_vt = 2, alpha_2 = 0.05, dist = 1)


Phase 2/3 seamless combination Group sequential design: Final analysis, With one sample size change

Description

Phase 2/3 seamless combination Group sequential design: Final analysis, With one sample size change

Usage

two_stage_est_back(
  s,
  c_bry_two_stg,
  c_bry_p3,
  comp,
  snew,
  c_bry_new,
  c_bry_new_p3,
  theta_hat_inter,
  theta_hat_inter_sd,
  inter_vt,
  theta_hat_last_ad,
  theta_hat_last_ad_sd,
  last_vt_ad,
  theta_hat_inter_p3,
  theta_hat_inter_p3_sd,
  theta_hat_last_ad_p3,
  theta_hat_last_ad_p3_sd,
  alpha_2,
  dist
)

Arguments

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

c_bry_two_stg

Vector of critical boundaries of the two-stage design for the overall test, one per analysis; must have the same length as 's'

c_bry_p3

Vector of critical boundaries of the prior (phase 3) study, one per phase 3 analysis; must have 'length(s) - 1' elements

comp

Number of comparisons in the phase 2 stage, e.g. the number of doses or the number of endpoints; must be at least 2

snew

Vector of new information fractions after the sample size is changed, one per analysis after the change; must have at least 'last_vt_ad' elements

c_bry_new

Vector of critical boundaries after the sample size is changed, one per analysis after the change; must have the same length as 'snew'

c_bry_new_p3

Vector of critical boundaries after the sample size is changed on the prior (phase 3) study scale, one per analysis after the change; must have the same length as 'snew'

theta_hat_inter

Treatment effect estimate observed at the interim analysis at which the sample size is changed

theta_hat_inter_sd

Standard error of 'theta_hat_inter'; must be > 0

inter_vt

Index of the interim analysis at which the sample size is re-estimated (1-based); must be less than 'length(s)', so that at least one further analysis remains

theta_hat_last_ad

Treatment effect estimate observed at the last analysis after the sample size change

theta_hat_last_ad_sd

Standard error of 'theta_hat_last_ad'; must be > 0

last_vt_ad

Index of the last analysis after the sample size change

theta_hat_inter_p3

Treatment effect estimate observed at the interim analysis at which the sample size is changed, using phase 3 data only

theta_hat_inter_p3_sd

Standard error of 'theta_hat_inter_p3'; must be > 0

theta_hat_last_ad_p3

Treatment effect estimate observed at the last analysis after the sample size change, using phase 3 data only

theta_hat_last_ad_p3_sd

Standard error of 'theta_hat_last_ad_p3'; must be > 0

alpha_2

Type I error for the two-sided test

dist

Distribution indicator of the endpoint: 1 = the endpoint is normally distributed and the comparison is between multiple doses and a common control, otherwise the non-normal branch is used

Value

A named list with the following components:

p-value

The p-value for the hypothesis test

confidence interval

Numeric vector of length 3 giving the lower confidence limit, the median unbiased point estimate and the upper confidence limit; the lower limit is consistent with the p-value, while the point estimate and the upper limit use phase 3 data only

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stage_est_back(s=c(1/3,2/3,1), c_bry_two_stg=c(3.776606,2.670463,2.180424),
c_bry_p3=c(3.954862,1.977431), comp=2, snew=c(0.5,1), c_bry_new=c(3,2.2),
c_bry_new_p3=c(3.2,2.4), theta_hat_inter=0.4, theta_hat_inter_sd=0.35, inter_vt=1,
theta_hat_last_ad=0.5, theta_hat_last_ad_sd=0.23, last_vt_ad=1, theta_hat_inter_p3=0.2,
theta_hat_inter_p3_sd=0.4, theta_hat_last_ad_p3=0.32, theta_hat_last_ad_p3_sd=0.4,
alpha_2=0.05, dist=1)


Phase 2/3 seamless combination Group sequential design: Binary distribution, Power calculation, O'Brien-Fleming boundary

Description

Phase 2/3 seamless combination Group sequential design: Binary distribution, Power calculation, O'Brien-Fleming boundary

Usage

two_stage_power_OF_boundary_binary_diff(
  p_t,
  p_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio,
  dist1,
  dist2
)

Arguments

p_t

Event rates of the test arms; a vector of length >= 2 with 0 < p_t < 1

p_c

Event rate of the common control arm; 0 < p_c < 1

margin

Non-inferiority margin; margin >= 0, with margin = 0 for a superiority trial and margin > 0 for a non-inferiority trial

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1, typically 0.025

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

First-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

dist2

Second-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

Value

A named list with the following components:

power

Nested list with the total power, the selection probability for each mu, the exit probability for each mu, the total phase 2 probability, the total exit probability and the conditional exit probability given the selected mu

type I error control

Nested list with the two-stage critical boundaries, the one-sided alpha spending, nominal alpha and cumulative alpha at each interim analysis, and the phase 3 information fraction, phase 3 critical boundary and nominal p-value for phase 3

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stage_power_OF_boundary_binary_diff(p_t = c(0.2,0.3,0.4), p_c = 0.5, margin = 0.15,
direction = 1, s = c(1/3,2/3,1), alpha = 0.025,
sampsz_control = 82, rand_ratio = 1, dist1 = 1, dist2 = 1)


Phase 2/3 seamless combination Group sequential design: Negative binomial distribution, Power calculation, O'Brien-Fleming boundary

Description

Phase 2/3 seamless combination Group sequential design: Negative binomial distribution, Power calculation, O'Brien-Fleming boundary

Usage

two_stage_power_OF_boundary_neg_binomial(
  r_t,
  r_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio,
  nu_t,
  kappa,
  dist1,
  dist2
)

Arguments

r_t

Mean event rates of the test arms; a vector of length >= 2

r_c

Mean event rate of the common control arm

margin

Non-inferiority margin; margin >= 0, with margin = 0 for a superiority trial and margin > 0 for a non-inferiority trial

direction

Test direction: 1 = larger r is better, otherwise smaller r is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1, typically 0.025

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

dist1

First-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, 2 = otherwise

dist2

Second-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, 2 = otherwise

Value

A named list with the following components:

power

Nested list with the total power, the selection probability for each mu, the exit probability for each mu, the total phase 2 probability, the total exit probability and the conditional exit probability given the selected mu

type I error control

Nested list with the two-stage critical boundaries, the one-sided alpha spending, nominal alpha and cumulative alpha at each interim analysis, and the phase 3 information fraction, phase 3 critical boundary and nominal p-value for phase 3

Reference

Reference for the negative binomial sample size formula used

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stage_power_OF_boundary_neg_binomial(r_t = c(1.1, 1.1, 1.1), r_c = 1.1, margin = 0.1,
direction = 0, s = c(1/3, 2/3, 1), alpha = 0.025, sampsz_control = 100, rand_ratio = 1,
nu_t = 6, kappa = 1, dist1 = 1, dist2 = 1)


Phase 2/3 seamless combination Group sequential design: Normal distribution, Power calculation, O'Brien-Fleming boundary

Description

Phase 2/3 seamless combination Group sequential design: Normal distribution, Power calculation, O'Brien-Fleming boundary

Usage

two_stage_power_OF_boundary_normal(
  mu_t,
  mu_c,
  std_t,
  std_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio,
  dist1,
  dist2
)

Arguments

mu_t

Means of the test arms; a vector of length >= 2

mu_c

Mean of the common control arm

std_t

Common standard deviation of the test arms; must be > 0

std_c

Standard deviation of the control arm; must be > 0

margin

Non-inferiority margin; margin >= 0, with margin = 0 for a superiority trial and margin > 0 for a non-inferiority trial

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1, typically 0.025

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

First-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

dist2

Second-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

Value

A named list with the following components:

power

Nested list with the total power, the selection probability for each mu, the exit probability for each mu, the total phase 2 probability, the total exit probability and the conditional exit probability given the selected mu

type I error control

Nested list with the two-stage critical boundaries, the one-sided alpha spending, nominal alpha and cumulative alpha at each interim analysis, and the phase 3 information fraction, phase 3 critical boundary and nominal p-value for phase 3

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stage_power_OF_boundary_normal(mu_t = c(0.2,0.3,0.4), mu_c = 0, std_t = 1, std_c = 1,
margin = 0.01, direction = 1, s = c(1/3,2/3,1), alpha = 0.025, sampsz_control = 180,
rand_ratio = 1, dist1 = 1, dist2 = 1)


Phase 2/3 seamless combination Group sequential design: Poisson distribution, Power calculation, O'Brien-Fleming boundary

Description

Phase 2/3 seamless combination Group sequential design: Poisson distribution, Power calculation, O'Brien-Fleming boundary

Usage

two_stage_power_OF_boundary_poisson(
  lambda_t,
  lambda_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio,
  dist1,
  dist2
)

Arguments

lambda_t

Mean event rates of the test arms; a vector of length >= 2

lambda_c

Mean event rate of the common control arm

margin

Non-inferiority margin; margin >= 0, with margin = 0 for a superiority trial and margin > 0 for a non-inferiority trial

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1, typically 0.025

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

First-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

dist2

Second-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

Value

A named list with the following components:

power

Nested list with the total power, the selection probability for each mu, the exit probability for each mu, the total phase 2 probability, the total exit probability and the conditional exit probability given the selected mu

type I error control

Nested list with the two-stage critical boundaries, the one-sided alpha spending, nominal alpha and cumulative alpha at each interim analysis, and the phase 3 information fraction, phase 3 critical boundary and nominal p-value for phase 3

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stage_power_OF_boundary_poisson(lambda_t = c(0.2,0.3,0.4), lambda_c = 0.5, margin = 0.12,
direction = 1, s = c(1/3,2/3,1), alpha = 0.025, sampsz_control = 150, rand_ratio = 1,
dist1 = 1, dist2 = 1)


Phase 2/3 seamless combination Group sequential design: Survival analysis, Power calculation, O'Brien-Fleming boundary

Description

Phase 2/3 seamless combination Group sequential design: Survival analysis, Power calculation, O'Brien-Fleming boundary

Usage

two_stage_power_OF_boundary_survival_Schoenfeld(
  HR,
  margin,
  direction,
  s,
  alpha,
  events_tot,
  rand_ratio,
  dist1,
  dist2
)

Arguments

HR

Hazard ratios of the test arms vs. the control arm; a vector of length >= 2

margin

Non-inferiority margin for the hazard ratio; must be > 0, with margin = 1 for a superiority trial and margin != 1 for a non-inferiority trial

direction

Test direction: 1 = larger HR is better, otherwise smaller HR is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; 0 < alpha < 1, typically 0.025

events_tot

Total number of events available for the trial

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

Distribution indicator for the first stage: 2 for this survival endpoint setting (this is conservative)

dist2

Distribution indicator for the second stage: 1 for this survival endpoint setting (this is conservative)

Value

A named list with the following components:

power

Nested list with the total power, the selection probability for each HR, the exit probability for each HR, the total phase 2 probability, the total exit probability and the conditional exit probability given the selected HR

type I error control

Nested list with the two-stage critical boundaries, the one-sided alpha spending, nominal alpha and cumulative alpha at each interim analysis, and the phase 3 information fraction, phase 3 critical boundary and nominal p-value for phase 3

reference

Reference for the Schoenfeld sample size formula used

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stage_power_OF_boundary_survival_Schoenfeld(HR = c(0.55,0.55), margin = 1, direction = 2,
s = c(1/3,2/3,1), alpha = 0.025,
events_tot = 137, rand_ratio = 1, dist1 = 2, dist2 = 1)


Phase 2/3 seamless combination Group sequential design: Binary distribution, Power calculation, Alpha-spending boundary

Description

Phase 2/3 seamless combination Group sequential design: Binary distribution, Power calculation, Alpha-spending boundary

Usage

two_stage_power_alsp_boundary_binary_diff(
  p_t,
  p_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio,
  dist1,
  dist2
)

Arguments

p_t

Event rates of the test arms; a vector of length >= 2 with 0 < p_t < 1

p_c

Event rate of the common control arm; 0 < p_c < 1

margin

Non-inferiority margin; margin >= 0, with margin = 0 for a superiority trial and margin > 0 for a non-inferiority trial

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; for the alpha-spending boundary this is the vector of alpha-spending values at each analysis, with one value per element of s and the values summing to the overall one-sided type I error, e.g. c(0.001, 0.001, 0.023)

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

First-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

dist2

Second-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

Value

A named list with the following components:

power

Nested list with the total power, the selection probability for each mu, the exit probability for each mu, the total phase 2 probability, the total exit probability and the conditional exit probability given the selected mu

type I error control

Nested list with the two-stage critical boundaries, the one-sided alpha spending, nominal alpha and cumulative alpha at each interim analysis, and the phase 3 information fraction, phase 3 critical boundary and nominal p-value for phase 3

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stage_power_alsp_boundary_binary_diff(p_t = c(0.2,0.3,0.4), p_c = 0.5, margin = 0.15,
direction = 1, s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023), sampsz_control = 82,
rand_ratio = 1, dist1 = 1, dist2 = 1)


Phase 2/3 seamless combination Group sequential design: Negative binomial distribution, Power calculation, Alpha-spending boundary

Description

Phase 2/3 seamless combination Group sequential design: Negative binomial distribution, Power calculation, Alpha-spending boundary

Usage

two_stage_power_alsp_boundary_neg_binomial(
  r_t,
  r_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio,
  nu_t,
  kappa,
  dist1,
  dist2
)

Arguments

r_t

Mean event rates of the test arms; a vector of length >= 2

r_c

Mean event rate of the common control arm

margin

Non-inferiority margin; margin >= 0, with margin = 0 for a superiority trial and margin > 0 for a non-inferiority trial

direction

Test direction: 1 = larger r is better, otherwise smaller r is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; for the alpha-spending boundary this is the vector of alpha-spending values at each analysis, with one value per element of s and the values summing to the overall one-sided type I error, e.g. c(0.001, 0.001, 0.048)

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

nu_t

Exposure time; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

dist1

First-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, 2 = otherwise

dist2

Second-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, 2 = otherwise

Value

A named list with the following components:

power

Nested list with the total power, the selection probability for each mu, the exit probability for each mu, the total phase 2 probability, the total exit probability and the conditional exit probability given the selected mu

type I error control

Nested list with the two-stage critical boundaries, the one-sided alpha spending, nominal alpha and cumulative alpha at each interim analysis, and the phase 3 information fraction, phase 3 critical boundary and nominal p-value for phase 3

Reference

Reference for the negative binomial sample size formula used

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stage_power_alsp_boundary_neg_binomial(r_t = c(0.2,0.3,0.4), r_c = 0.6, margin = 0.1,
direction = 1, s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.048), sampsz_control = 111,
rand_ratio = 1, nu_t = 1, kappa = 1, dist1 = 1, dist2 = 1)


Phase 2/3 seamless combination Group sequential design: Normal distribution, Power calculation, Alpha-spending boundary

Description

Phase 2/3 seamless combination Group sequential design: Normal distribution, Power calculation, Alpha-spending boundary

Usage

two_stage_power_alsp_boundary_normal(
  mu_t,
  mu_c,
  std_t,
  std_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio,
  dist1,
  dist2
)

Arguments

mu_t

Means of the test arms; a vector of length >= 2

mu_c

Mean of the common control arm

std_t

Common standard deviation of the test arms; must be > 0

std_c

Standard deviation of the control arm; must be > 0

margin

Non-inferiority margin; margin >= 0, with margin = 0 for a superiority trial and margin > 0 for a non-inferiority trial

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; for the alpha-spending boundary this is the vector of alpha-spending values at each analysis, with one value per element of s and the values summing to the overall one-sided type I error, e.g. c(0.001, 0.001, 0.023)

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

First-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

dist2

Second-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

Value

A named list with the following components:

power

Nested list with the total power, the selection probability for each mu, the exit probability for each mu, the total phase 2 probability, the total exit probability and the conditional exit probability given the selected mu

type I error control

Nested list with the two-stage critical boundaries, the one-sided alpha spending, nominal alpha and cumulative alpha at each interim analysis, and the phase 3 information fraction, phase 3 critical boundary and nominal p-value for phase 3

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stage_power_alsp_boundary_normal(mu_t = c(0.2,0.3,0.4), mu_c = 0, std_t = 1, std_c = 1,
margin = 0.01, direction = 1, s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023),
sampsz_control = 180, rand_ratio = 1, dist1 = 1, dist2 = 1)


Phase 2/3 seamless combination Group sequential design: Poisson distribution, Power calculation, Alpha-spending boundary

Description

Phase 2/3 seamless combination Group sequential design: Poisson distribution, Power calculation, Alpha-spending boundary

Usage

two_stage_power_alsp_boundary_poisson(
  lambda_t,
  lambda_c,
  margin,
  direction,
  s,
  alpha,
  sampsz_control,
  rand_ratio,
  dist1,
  dist2
)

Arguments

lambda_t

Mean event rates of the test arms; a vector of length >= 2

lambda_c

Mean event rate of the common control arm

margin

Non-inferiority margin; margin >= 0, with margin = 0 for a superiority trial and margin > 0 for a non-inferiority trial

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; for the alpha-spending boundary this is the vector of alpha-spending values at each analysis, with one value per element of s and the values summing to the overall one-sided type I error, e.g. c(0.001, 0.001, 0.023)

sampsz_control

Sample size of the control arm

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

First-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

dist2

Second-stage distribution indicator: 1 = the sample size calculation is for multiple dose vs. a common control, with normal distributions, 2 = otherwise

Value

A named list with the following components:

power

Nested list with the total power, the selection probability for each mu, the exit probability for each mu, the total phase 2 probability, the total exit probability and the conditional exit probability given the selected mu

type I error control

Nested list with the two-stage critical boundaries, the one-sided alpha spending, nominal alpha and cumulative alpha at each interim analysis, and the phase 3 information fraction, phase 3 critical boundary and nominal p-value for phase 3

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stage_power_alsp_boundary_poisson(lambda_t = c(0.2,0.3,0.4), lambda_c = 0.5, margin = 0.12,
direction = 1, s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023), sampsz_control = 150,
rand_ratio = 1, dist1 = 1, dist2 = 1)


Phase 2/3 seamless combination Group sequential design: Survival analysis, Power calculation, Alpha-spending boundary

Description

Phase 2/3 seamless combination Group sequential design: Survival analysis, Power calculation, Alpha-spending boundary

Usage

two_stage_power_alsp_boundary_survival_Schoenfeld(
  HR,
  margin,
  direction,
  s,
  alpha,
  events_tot,
  rand_ratio,
  dist1,
  dist2
)

Arguments

HR

Hazard ratios of the test arms vs. the control arm; a vector of length >= 2

margin

Non-inferiority margin for the hazard ratio; must be > 0, with margin = 1 for a superiority trial and margin != 1 for a non-inferiority trial

direction

Test direction: 1 = larger HR is better, otherwise smaller HR is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

alpha

Type I error for the one-sided test; for the alpha-spending boundary this is the vector of alpha-spending values at each analysis, with one value per element of s and the values summing to the overall one-sided type I error, e.g. c(0.001, 0.001, 0.023)

events_tot

Total number of events available for the trial

rand_ratio

Randomization ratio: number of subjects in the test arm vs. the number of subjects in the control arm; must be > 0

dist1

Distribution indicator for the first stage: 2 for this survival endpoint setting (this is conservative)

dist2

Distribution indicator for the second stage: 1 for this survival endpoint setting (this is conservative)

Value

A named list with the following components:

power

Nested list with the total power, the selection probability for each HR, the exit probability for each HR, the total phase 2 probability, the total exit probability and the conditional exit probability given the selected HR

type I error control

Nested list with the two-stage critical boundaries, the one-sided alpha spending, nominal alpha and cumulative alpha at each interim analysis, and the phase 3 information fraction, phase 3 critical boundary and nominal p-value for phase 3

reference

Reference for the Schoenfeld sample size formula used

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stage_power_alsp_boundary_survival_Schoenfeld(HR = c(0.2,0.3,0.4), margin = 1.1,
direction = 1, s = c(1/3,2/3,1), alpha = c(0.001,0.001,0.023), events_tot = 20,
rand_ratio = 1, dist1 = 1, dist2 = 1)


Phase 2/3 seamless combination Group sequential design: Simulations, Binary distribution, Operating characteristics

Description

Phase 2/3 seamless combination Group sequential design: Simulations, Binary distribution, Operating characteristics

Usage

two_stg_adapt_power_simu_binary(
  p_t,
  p_c,
  direction,
  s,
  bry_type,
  alpha_2,
  theta_cut,
  N_max,
  samsz,
  beta,
  sim_num
)

Arguments

p_t

Event rate of the test arm; each element must be > 0 and < 1

p_c

Event rate of the control arm; must be > 0 and < 1

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = Pocock; any other value leaves the boundaries undefined

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

theta_cut

Lack-of-efficacy threshold: an effect size below which the test drug is not considered to provide clinically meaningful efficacy

N_max

Maximum sample size (control arm) allowed after sample size re-estimation

samsz

Planned sample size of the control arm used in the simulation

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; 0 < beta < 1

sim_num

Number of simulation replicates

Value

A named list with the following components:

Sequential design

Matrix of the planned adaptive group sequential design, with one row per analysis and the columns "Look", "Information fraction", "Critical boundaries", "rejection by look" and "Sample size increase"

Results by arm

Matrix with one row per dose and the columns "p<sub>t1</sub>,...", "p<sub>c</sub>", "selection rate", "rejection rate by each p_t" and "conditional rejection rate"; the selection rate is the probability that the dose is selected to proceed to phase 3, the rejection rate is the probability that the dose is selected and the null hypothesis is rejected, and the conditional rejection rate is the rejection rate divided by the selection rate

Simulation results

Named vector of the "Rejection rate without SSR", the "Rejection rate with SSR", the "rate of sample size increase", the "Rejection rate without SSR/(meeting sample size incerase criteria)", the "Rejection rate with SSR/(sample size incerase)", the "Type I error", the "Non-Type I error rejection rate", the "Futility rate", the "Planned control sample size", the "Maximum control sample size", the "Mean control sample size", the "Planned total sample size", the "Mean total sample size" and the "mean control sample size conditional on increase"

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stg_adapt_power_simu_binary(p_t = c(0.4,0.5), p_c = 0.3, direction = 1, s = c(1/3,2/3,1),
bry_type = 1, alpha_2 = 0.05, theta_cut = 0.05, N_max = 1000, samsz = 100,
beta = 0.1, sim_num = 20)


Phase 2/3 seamless combination Group sequential design: Simulations, Negative binomial distribution, Operating characteristics

Description

Phase 2/3 seamless combination Group sequential design: Simulations, Negative binomial distribution, Operating characteristics

Usage

two_stg_adapt_power_simu_neg_binomial(
  r_t,
  r_c,
  kappa,
  direction,
  s,
  bry_type,
  alpha_2,
  theta_cut,
  samsz,
  N_max,
  beta,
  sim_num
)

Arguments

r_t

Mean event rates of the test arms; each element must be > 0

r_c

Mean event rate of the control arm; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

direction

Test direction: 1 = larger r is better, otherwise smaller r is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = Pocock; any other value leaves the boundaries undefined

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

theta_cut

Lack-of-efficacy threshold: an effect size below which the test drug is not considered to provide clinically meaningful efficacy

samsz

Planned sample size of the control arm used in the simulation

N_max

Maximum sample size (control arm) allowed after sample size re-estimation

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; 0 < beta < 1

sim_num

Number of simulation replicates

Value

A named list with the following components:

Sequential design

Matrix of the planned adaptive group sequential design, with one row per analysis and the columns "Look", "Information fraction", "Critical boundaries", "rejection by look" and "Sample size increase"

Results by arm

Matrix with one row per dose and the columns "r<sub>t1</sub>,...", "r<sub>c</sub>", "selection rate", "rejection rate by each r_t" and "conditional rejection rate"; the selection rate is the probability that the dose is selected to proceed to phase 3, the rejection rate is the probability that the dose is selected and the null hypothesis is rejected, and the conditional rejection rate is the rejection rate divided by the selection rate

Simulation results

Named vector of the "Rejection rate without SSR", the "Rejection rate with SSR", the "rate of sample size increase", the "Rejection rate without SSR/(meeting sample size incerase criteria)", the "Rejection rate with SSR/(sample size incerase)", the "Type I error", the "Non-Type I error rejection rate", the "Futility rate", the "Planned control sample size", the "Maximum control sample size", the "Mean control sample size", the "Planned total sample size", the "Mean total sample size" and the "mean control sample size conditional on increase"

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stg_adapt_power_simu_neg_binomial(
r_t = c(1.1,1.1,1.1), r_c = 1.1, kappa = 1, direction = 1,
s = c(1/3,1), bry_type = 1, alpha_2 = 0.05, theta_cut = 0.05, samsz = 100, N_max = 1000,
beta = 0.1, sim_num = 20)


Phase 2/3 seamless combination Group sequential design: Simulations, Normal distribution, Operating characteristics

Description

Phase 2/3 seamless combination Group sequential design: Simulations, Normal distribution, Operating characteristics

Usage

two_stg_adapt_power_simu_normal(
  mu_t,
  mu_c,
  sigma_t,
  sigma_c,
  direction,
  s,
  bry_type,
  alpha_2,
  theta_cut,
  samsz,
  N_max,
  beta,
  sim_num
)

Arguments

mu_t

Vector of means of the test arms, one entry per dose

mu_c

Mean of the control arm

sigma_t

Standard deviation of the test arms

sigma_c

Standard deviation of the control arm

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = Pocock; any other value leaves the boundaries undefined

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

theta_cut

Lack-of-efficacy threshold: an effect size below which the test drug is not considered to provide clinically meaningful efficacy

samsz

Planned sample size of the control arm used in the simulation

N_max

Maximum sample size (control arm) allowed after sample size re-estimation

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; 0 < beta < 1

sim_num

Number of simulation replicates

Value

A named numeric vector with the following components:

Rejection rate without SSR

Rejection rate of the trial if the sample size is not re-estimated

Rejection rate with SSR

Rejection rate of the trial under the adaptive procedure with sample size re-estimation

rate of sample size increase

Rate of simulations in which the sample size is increased

Rejection rate without SSR/(meeting sample size incerase criteria)

Rejection rate without sample size re-estimation among the simulations that meet the sample size increase criteria

Rejection rate with SSR/(sample size incerase)

Rejection rate with sample size re-estimation among the simulations in which the sample size is increased

Type I error

Simulated one-sided type I error rate

Non-Type I error rejection rate

Simulated rejection rate when the true effect is non-zero

Futility rate

Rate of simulations stopped for lack of efficacy, i.e. for which the observed interim effect size is below theta_cut

Planned control sample size

Planned sample size of the control arm

Maximum control sample size

Maximum permitted sample size of the control arm

Mean control sample size

Mean simulated sample size of the control arm

Planned total sample size

Planned total sample size of the trial

Mean total sample size

Mean simulated total sample size of the trial

mean control sample size conditional on increase

Mean simulated control sample size among the simulations in which the sample size is increased

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stg_adapt_power_simu_normal(mu_t = c(0,0,0), mu_c = 0, sigma_t = 1, sigma_c = 1,
direction = 1, s = c(1/3,2/3,1), bry_type = 2, alpha_2 = c(0.001,0.001,0.048),
theta_cut = 0.05, samsz = 100, N_max = 500, beta = 0.1, sim_num = 20)


Phase 2/3 seamless combination Group sequential design: Simulations, Poisson distribution, Operating characteristics

Description

Phase 2/3 seamless combination Group sequential design: Simulations, Poisson distribution, Operating characteristics

Usage

two_stg_adapt_power_simu_poisson(
  lambda_t,
  lambda_c,
  direction,
  s,
  bry_type,
  alpha_2,
  theta_cut,
  N_max,
  samsz,
  beta,
  sim_num
)

Arguments

lambda_t

Mean of the test arm; each element must be > 0

lambda_c

Mean of the control arm; must be > 0

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = Pocock; any other value leaves the boundaries undefined

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

theta_cut

Lack-of-efficacy threshold: an effect size below which the test drug is not considered to provide clinically meaningful efficacy

N_max

Maximum sample size (control arm) allowed after sample size re-estimation

samsz

Planned sample size of the control arm used in the simulation

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; 0 < beta < 1

sim_num

Number of simulation replicates

Value

A named list with the following components:

Sequential design

Matrix of the planned adaptive group sequential design, with one row per analysis and the columns "Look", "Information fraction", "Critical boundaries", "rejection by look" and "Sample size increase"

Results by arm

Matrix with one row per dose and the columns "lambda_t1,...", "lambda_c", "selection rate", "rejection rate by each lambda_t" and "conditional rejection rate"; the selection rate is the probability that the dose is selected to proceed to phase 3, the rejection rate is the probability that the dose is selected and the null hypothesis is rejected, and the conditional rejection rate is the rejection rate divided by the selection rate

Simulation results

Named vector of the "Rejection rate without SSR", the "Rejection rate with SSR", the "rate of sample size increase", the "Rejection rate without SSR/(meeting sample size incerase criteria)", the "Rejection rate with SSR/(sample size incerase)", the "Type I error", the "Non-Type I error rejection rate", the "Futility rate", the "Planned control sample size", the "Maximum control sample size", the "Mean control sample size", the "Planned total sample size", the "Mean total sample size" and the "mean control sample size conditional on increase"

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stg_adapt_power_simu_poisson(lambda_t = c(1.1,1.1,1.1), lambda_c = 1.1, direction = 1,
s = c(1/3,1), bry_type = 1, alpha_2 = 0.05,
theta_cut = 0.05, N_max = 1000, samsz = 100, beta = 0.1, sim_num = 20)


Phase 2/3 seamless combination Group sequential design: Simulations, Survival analysis, Operating characteristics

Description

Phase 2/3 seamless combination Group sequential design: Simulations, Survival analysis, Operating characteristics

Usage

two_stg_adapt_power_simu_survival(
  HR,
  s,
  bry_type,
  alpha_2,
  evt_num,
  evt_max,
  HR_cut,
  surv_rate,
  beta,
  sim_num
)

Arguments

HR

Vector of hazard ratios of each test arm vs. the control arm, one entry per dose; must be > 0, with HR < 1 indicating a beneficial effect and HR = 1 the null hypothesis

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = Pocock; any other value leaves the boundaries undefined

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

evt_num

Planned number of events between a test arm and the control arm at the final analysis

evt_max

Maximum number of events between a test arm and the control arm allowed after sample size re-estimation

HR_cut

Hazard-ratio cut-off for lack of efficacy at the interim analysis: the test drug is not considered to provide clinically meaningful efficacy when the observed hazard ratio is greater than HR_cut

surv_rate

Survival rate at the end of follow-up, used to translate the number of events into a sample size

beta

Conditional type II error; 1 - beta is the target conditional power for the sample size re-estimation; 0 < beta < 1

sim_num

Number of simulation replicates

Value

A named list with the following components:

Sequential design

Matrix of the planned adaptive group sequential design, with one row per analysis and the columns "Look", "Information fraction", "Critical boundaries", "rejection by look" and "Sample size increase"

Results by arm

Matrix with one row per dose and the columns "HR", "selection rate", "rejection rate by each HR" and "conditional rejection rate"; the selection rate is the probability that the dose is selected to proceed to phase 3, the rejection rate is the probability that the dose is selected and the null hypothesis is rejected, and the conditional rejection rate is the rejection rate divided by the selection rate

Simulation results

Named vector of the "rejection rate without SSR", the "rejection rate with SSR", the "Rate of sample size increase", the "Rejection rate without SSR/(meeting sample size incerase criteria)", the "Rejection rate with SSR/(sample size incerase)", the "Type I error", the "Non-Type I error rejection rate", the "Futility rate", the "Planned event number for two arms", the "Maximum number of events for two arms", the "Mean event number for two arms", the "Planned total number of events", the "total number of events" and the "Mean event number for two arms conditional on increase"

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stg_adapt_power_simu_survival(HR = rep(1,2), s = c(1/3,2/3,1), bry_type = 1, alpha_2 = 0.05,
evt_num = 150, evt_max = 1500, HR_cut = 0.95, surv_rate = 0.5, beta = 0.1, sim_num = 20)


Phase 2/3 seamless combination Group sequential design: Simulations, Binary distribution, Type I error and power

Description

Phase 2/3 seamless combination Group sequential design: Simulations, Binary distribution, Type I error and power

Usage

two_stg_power_simu_binary(
  p_t,
  p_c,
  direction,
  s,
  bry_type,
  alpha_2,
  samsz,
  sim_num
)

Arguments

p_t

Event rate of the test arm

p_c

Event rate of the control arm

direction

Test direction: 1 = larger p is better, otherwise smaller p is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = Pocock; any other value leaves the boundaries undefined

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

samsz

Planned sample size of the control arm used in the simulation

sim_num

Number of simulation replicates

Value

A named list with the following components:

Sequential design

Matrix of the planned group sequential design, with one row per analysis and the columns "Look", "Information fraction", "Critical boundaries" and "rejection by look"

Results by arm

Matrix with one row per dose and the columns "p<sub>t1</sub>,...", "p<sub>c</sub>", "selection rate", " rejection rate by each p_t" and "conditional rejection rate"; the selection rate is the probability that the dose is selected to proceed to phase 3, the rejection rate is the probability that the dose is selected and the null hypothesis is rejected, and the conditional rejection rate is the rejection rate divided by the selection rate

Simulation results

Named vector of the overall "rejection rate", the "Type I error", the "Non-Type I error rejection rate", the "Planned control sample size", the "Mean control sample size", the "Planned total sample size" and the "Mean total sample size"

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stg_power_simu_binary(p_t = c(0.4,0.4,0.4), p_c = 0.4, direction = 1, s = c(1/3,2/3,1),
bry_type = 1, alpha_2 = 0.05, samsz = 100, sim_num = 20)


Phase 2/3 seamless combination Group sequential design: Simulations, Negative binomial distribution, Type I error and power

Description

Phase 2/3 seamless combination Group sequential design: Simulations, Negative binomial distribution, Type I error and power

Usage

two_stg_power_simu_neg_binomial(
  r_t,
  r_c,
  kappa,
  direction,
  s,
  bry_type,
  alpha_2,
  samsz,
  sim_num
)

Arguments

r_t

Mean event rates of the test arms; each element must be > 0

r_c

Mean event rate of the control arm; must be > 0

kappa

Dispersion parameter of the negative binomial model; must be > 0

direction

Test direction: 1 = larger r is better, otherwise smaller r is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = Pocock; any other value leaves the boundaries undefined

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

samsz

Planned sample size of the control arm used in the simulation

sim_num

Number of simulation replicates

Value

A named list with the following components:

Sequential design

Matrix of the planned group sequential design, with one row per analysis and the columns "Look", "Information fraction", "Critical boundaries" and "rejection by look"

Results by arm

Matrix with one row per dose and the columns "r<sub>t1</sub>,...", "r<sub>c</sub>", "selection rate", "rejection rate by each r_t" and "conditional rejection rate"; the selection rate is the probability that the dose is selected to proceed to phase 3, the rejection rate is the probability that the dose is selected and the null hypothesis is rejected, and the conditional rejection rate is the rejection rate divided by the selection rate

Simulation results

Named vector of the overall "rejection rate", the "Type I error", the "Non-Type I error rejection rate", the "Planned control sample size", the "Mean control sample size", the "Planned total sample size" and the "Mean total sample size"

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stg_power_simu_neg_binomial(r_t = c(1.1,1.1,1.1), r_c = 1.1, kappa = 1, direction = 1,
s = c(1/3,1), bry_type = 1, alpha_2 = 0.05, samsz = 100, sim_num = 20)


Phase 2/3 seamless combination Group sequential design: Simulations, Normal distribution, Type I error and power

Description

Phase 2/3 seamless combination Group sequential design: Simulations, Normal distribution, Type I error and power

Usage

two_stg_power_simu_normal(
  mu_t,
  mu_c,
  sigma_t,
  sigma_c,
  direction,
  s,
  bry_type,
  alpha_2,
  samsz,
  sim_num
)

Arguments

mu_t

Vector of means of the test arms, one entry per dose

mu_c

Mean of the control arm

sigma_t

Standard deviation of the test arms

sigma_c

Standard deviation of the control arm

direction

Test direction: 1 = larger mu is better, otherwise smaller mu is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = Pocock; any other value leaves the boundaries undefined

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

samsz

Planned sample size of the control arm used in the simulation

sim_num

Number of simulation replicates

Value

A named list with the following components:

Sequential design

Matrix of the planned group sequential design, with one row per analysis and the columns "Look", "Information fraction", "Critical boundaries" and "rejection by look"

Results by arm

Matrix with one row per dose and the columns "mu_t1,...", "mu_c", "selection rate", " rejection rate by each mu_t" and "conditional rejection rate"; the selection rate is the probability that the dose is selected to proceed to phase 3, the rejection rate is the probability that the dose is selected and the null hypothesis is rejected, and the conditional rejection rate is the rejection rate divided by the selection rate

Simulation results

Named vector of the overall "rejection rate", the "Type I error", the "Non-Type I error rejection rate", the "Planned control sample size", the "Mean control sample size", the "Planned total sample size" and the "Mean total sample size"

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stg_power_simu_normal(mu_t = c(0,0,0), mu_c = 0, sigma_t = 1, sigma_c = 1, direction = 1,
s = c(1/3,1), bry_type = 1, alpha_2 = 0.05, samsz = 100, sim_num = 20)


Phase 2/3 seamless combination Group sequential design: Simulations, Poisson distribution, Type I error and power

Description

Phase 2/3 seamless combination Group sequential design: Simulations, Poisson distribution, Type I error and power

Usage

two_stg_power_simu_poisson(
  lambda_t,
  lambda_c,
  direction,
  s,
  bry_type,
  alpha_2,
  samsz,
  sim_num
)

Arguments

lambda_t

Mean of the test arm; each element must be > 0

lambda_c

Mean of the control arm; must be > 0

direction

Test direction: 1 = larger lambda is better, otherwise smaller lambda is better

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = Pocock; any other value leaves the boundaries undefined

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

samsz

Planned sample size of the control arm used in the simulation

sim_num

Number of simulation replicates

Value

A named list with the following components:

Sequential design

Matrix of the planned group sequential design, with one row per analysis and the columns "Look", "Information fraction", "Critical boundaries" and "rejection by look"

Results by arm

Matrix with one row per dose and the columns "lambda_t1,...", "lambda_c", "selection rate", "rejection rate by each lambda_t" and "conditional rejection rate"; the selection rate is the probability that the dose is selected to proceed to phase 3, the rejection rate is the probability that the dose is selected and the null hypothesis is rejected, and the conditional rejection rate is the rejection rate divided by the selection rate

Simulation results

Named vector of the overall "rejection rate", the "Type I error", the "Non-Type I error rejection rate", the "Planned control sample size", the "Mean control sample size", the "Planned total sample size" and the "Mean total sample size"

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stg_power_simu_poisson(lambda_t = c(1.1,1.3,1.4), lambda_c = 1.1, direction = 1,
s = c(1/3,1), bry_type = 1, alpha_2 = 0.05,
samsz = 100, sim_num = 20)


Phase 2/3 seamless combination Group sequential design: Simulations, Survival analysis, Type I error and power

Description

Phase 2/3 seamless combination Group sequential design: Simulations, Survival analysis, Type I error and power

Usage

two_stg_power_simu_survival(
  HR,
  s,
  bry_type,
  alpha_2,
  surv_rate,
  evt_num,
  sim_num
)

Arguments

HR

Vector of hazard ratios of each test arm vs. the control arm, one entry per dose; HR < 1 indicates a beneficial effect

s

Vector of information fractions of each analysis, e.g. c(1/3, 2/3, 1); the last element must be 1

bry_type

Critical boundary type: 1 = O'Brien-Fleming, 2 = Pocock; any other value leaves the boundaries undefined

alpha_2

Type I error for the two-sided test; 0 < alpha_2 < 1

surv_rate

Survival rate at the end of follow-up, used to translate the number of events into a sample size

evt_num

Number of events between a test arm and the control arm at the final analysis, used as the planned number of events

sim_num

Number of simulation replicates

Value

A named list with the following components:

Sequential design

Matrix of the planned group sequential design, with one row per analysis and the columns "Look", "Information fraction", "Critical boundaries" and "rejection by look"

Results by arm

Matrix with one row per dose and the columns "HR", "selection rate", "rejection rate by each HR" and "conditional rejection rate"; the selection rate is the probability that the dose is selected to proceed to phase 3, the rejection rate is the probability that the dose is selected and the null hypothesis is rejected, and the conditional rejection rate is the rejection rate divided by the selection rate

Simulation results

Named vector of the overall "rejection rate", the "Type I error", the "Non-Type I error rejection rate", the "Planned event number for two arms", the "Mean event number for two arms", the "Planned total number of events" and the "total number of events"

References

P. Gao, Y. Li (05 May 2024): Adaptive two-stage seamless sequential design for clinical trials, Journal of Biopharmaceutical Statistics, DOI: 10.1080/10543406.2024.2342518. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2342518

Gao, P., Zhang, W. (2024). A systematic approach to adaptive sequential design for clinical trials: using simulations to select a design with desired operating characteristics. Journal of Biopharmaceutical Statistics,2024 Aug;34(5):737-752. doi:10.1080/10543406.2024.2358796. Epub 2024 May 30. To link to this article: https://www.tandfonline.com/doi/full/10.1080/10543406.2024.2358796

H.H. Müller, H. Schäfer. Adaptive Group Sequential Designs for Clinical Trials: Combining the Advantages of Adaptive and of Classical Group Sequential Approaches. BIOMETRICs 57, 886-891. September 2001.

P. Gao, J. H. Ware, C. Mehta. Sample size re-estimation for adaptive sequential design in clinical trials. J Biopharm Stat. 2008;18(6):1184-96.

Examples

two_stg_power_simu_survival(HR = c(0.8,0.8), s = c(1/3,2/3,1), bry_type = 1, alpha_2 = 0.05,
surv_rate = 0.5, evt_num = 800, sim_num = 20)