Skip to contents

This function is used to identify the efficacy and futility boundaries based on the following rules: Efficacy boundary: find minimum x (xU) where Pr(RR > p1 |x, n, a, b) >= tU and Futility boundary: find maximum x (xL) where Pr(RR < p0 | x, n, a, b) >= tL

Usage

boundsPostprob(looks, p0, p1 = p0, tL, tU, parE = c(1, 1), weights)

Arguments

looks

(numeric):
A vector of number of patients in each look.

p0

(number):
lower Futility threshold of response rate.

p1

(number):
upper Efficacy threshold of response rate.

tL

(number):
posterior probability threshold for being below p0.

tU

(number):
posterior probability threshold for being above p1.

parE

(matrix):
the beta parameters matrix, with K rows and 2 columns, corresponding to the beta parameters of the K components.

weights

(vector):
The mixture weights of the beta mixture prior.

Value

A matrix for each same size in looks. For each sample size, the following is returned:

  • xL : the maximum number of responses that meet the futility threshold.

  • pL : response rate corresponding to xL.

  • postL: posterior probability corresponding to xL, i.e. Pr(RR < p0 | xL, n, a, b).

  • pL_upper_ci : upper bound of one sided 95% CI for the response rate pL based on an exact binomial test.

  • xU : the minimal number of responses that meet the efficacy threshold.

  • pU : response rate corresponding to xU.

  • postU : posterior probability corresponding to xU, i.e. Pr(RR > p1 |xU, n, a, b).

  • pU_lower_ci : lower bound of one sided 95% CI for the response rate pU based on exact binomial test.

Examples

# 40 pts trial with interim looks after each 10 pts.,
# Efficacy decision if more than 80% probability to be above 20% ORR,
# Futility decision if more than 60% probability to be below 15% ORR,
# with uniform prior (i.e. beta(1, 1)) on the ORR:
boundsPostprob(
  looks = c(10, 20, 30, 40),
  p0 = 0.15,
  p1 = 0.20,
  tL = 0.60,
  tU = 0.80,
  parE = c(1, 1)
)
#>    looks xL  pL  postL pL_upper_ci xU     pU  postU pU_lower_ci
#> 10    10  0 0.0 0.8327      0.2589  3 0.3000 0.8389      0.0873
#> 20    20  2 0.1 0.6295      0.2826  6 0.3000 0.8915      0.1396
#> 30    30  3 0.1 0.7039      0.2386  8 0.2667 0.8492      0.1402
#> 40    40  4 0.1 0.7567      0.2144 10 0.2500 0.8177      0.1424

# 40 pts trial with interim looks at 7 and 20 pts.
# Efficacy decision if more than 80% probability to be above 20% ORR,
# Futility decision if more than 60% probability to be below 15% ORR,
# with mixed prior and weights:
boundsPostprob(
  looks = c(7, 20, 40),
  p0 = 0.15,
  p1 = 0.20,
  tL = 0.60,
  tU = 0.80,
  parE = rbind(c(1, 19), c(2, 10)),
  weights = c(0.2, 0.8)
)
#>    looks xL    pL  postL pL_upper_ci xU     pU  postU pU_lower_ci
#> 7      7  0 0.000 0.7456      0.3482  2 0.2857 0.8890      0.0534
#> 20    20  2 0.100 0.6601      0.2826  6 0.3000 0.9054      0.1396
#> 40    40  5 0.125 0.6173      0.2450 10 0.2500 0.8012      0.1424