Skip to contents

This function calculates Go, NoGo, and Gray probabilities for binary outcome clinical trials under the Bayesian framework using two metrics: (i) posterior probability for the treatment effect to be greater than a threshold, and (ii) posterior predictive probability of phase III study success. The function supports controlled, uncontrolled, and external control designs.

Usage

BayesDecisionProbBinary(
  prob = "posterior",
  design = "controlled",
  theta.TV,
  theta.MAV,
  theta.NULL = NULL,
  gamma1,
  gamma2,
  pi1,
  pi2,
  n1,
  n2,
  a1,
  a2,
  b1,
  b2,
  z = NULL,
  m1,
  m2,
  ne1,
  ne2,
  ye1,
  ye2,
  ae1,
  ae2
)

Arguments

prob

A character string specifying the type of probability to use (prob = 'posterior' or prob = 'predictive').

design

A character string specifying the type of design (design = 'controlled', design = 'uncontrolled', or design = 'external').

theta.TV

A numeric value representing the pre-specified threshold value for calculating Go probability when prob = 'posterior'.

theta.MAV

A numeric value representing the pre-specified threshold value for calculating NoGo probability when prob = 'posterior'.

theta.NULL

A numeric value representing the pre-specified threshold value for calculating Go/NoGo probabilities when prob = 'predictive'.

gamma1

A numeric value between 0 and 1 representing the minimum probability to declare success.

gamma2

A numeric value between 0 and 1 representing the futility threshold.

pi1

A numeric value or vector representing true response probability(s) for group 1.

pi2

A numeric value or vector representing true response probability(s) for group 2.

n1

A positive integer representing the number of patients in group 1 for a proof-of-concept (PoC) trial.

n2

A positive integer representing the number of patients in group 2 for the PoC trial.

a1

A positive numeric value representing the first shape parameter of the prior distribution for group 1.

a2

A positive numeric value representing the first shape parameter of the prior distribution for group 2.

b1

A positive numeric value representing the second shape parameter of the prior distribution for group 1.

b2

A positive numeric value representing the second shape parameter of the prior distribution for group 2.

z

A non-negative integer representing the hypothetical observed number of responders in group 2 for an uncontrolled design.

m1

A positive integer representing the number of patients in group 1 for the future trial data.

m2

A positive integer representing the number of patients in group 2 for the future trial data.

ne1

A positive integer representing the number of patients in group 1 for the external data.

ne2

A positive integer representing the number of patients in group 2 for the external data.

ye1

A non-negative integer representing the observed number of responders in group 1 for the external data.

ye2

A non-negative integer representing the observed number of responders in group 2 for the external data.

ae1

A positive numeric value representing the scale parameter (power parameter) for group 1.

ae2

A positive numeric value representing the scale parameter (power parameter) for group 2.

Value

A data frame containing the true response probabilities for both groups, and the Go, NoGo, and Gray probabilities.

Details

The function can obtain:

  • Go probability

  • NoGo probability

  • Gray probability

The function can be used for controlled design, uncontrolled design, and design using external (historical) data. The decision framework is based on:

  • Go: Probability that the treatment effect exceeds the efficacy threshold

  • NoGo: Probability that the treatment effect is below the futility threshold

  • Gray: Intermediate zone where neither Go nor NoGo criteria are met

Examples

# Calculate Go/NoGo/Gray probabilities using posterior probability for controlled design
BayesDecisionProbBinary(
  prob = 'posterior', design = 'controlled', theta.TV = 0.4, theta.MAV = 0.2, theta.NULL = NULL,
  gamma1 = 0.5, gamma2 = 0.2, pi1 = c(0.2, 0.4, 0.6, 0.8), pi2 = rep(0.2, 4), n1 = 12, n2 = 12,
  a1 = 0.5, a2 = 0.5, b1 = 0.5, b2 = 0.5, z = NULL, m1 = NULL, m2 = NULL, ne1 = NULL, ne2 = NULL,
  ye1 = NULL, ye2 = NULL, ae1 = NULL, ae2 = NULL
)
#>   pi1 pi2          Go      Gray         NoGo
#> 1 0.2 0.2 0.002318252 0.3230196 0.6746621672
#> 2 0.4 0.2 0.075866100 0.7183683 0.2057655626
#> 3 0.6 0.2 0.384587482 0.5868683 0.0285441901
#> 4 0.8 0.2 0.811071055 0.1879492 0.0009797803

# Calculate Go/NoGo/Gray probabilities using posterior predictive probability for controlled design
BayesDecisionProbBinary(
  prob = 'predictive', design = 'controlled', theta.TV = NULL, theta.MAV = NULL, theta.NULL = 0,
  gamma1 = 0.9, gamma2 = 0.3, pi1 = c(0.2, 0.4, 0.6, 0.8), pi2 = rep(0.2, 4), n1 = 12, n2 = 12,
  a1 = 0.5, a2 = 0.5, b1 = 0.5, b2 = 0.5, z = NULL, m1 = 30, m2 = 30, ne1 = NULL, ne2 = NULL,
  ye1 = NULL, ye2 = NULL, ae1 = NULL, ae2 = NULL
)
#>   pi1 pi2         Go       Gray         NoGo
#> 1 0.2 0.2 0.05181157 0.65653374 2.916547e-01
#> 2 0.4 0.2 0.31955679 0.63725065 4.319256e-02
#> 3 0.6 0.2 0.73018709 0.26683521 2.977694e-03
#> 4 0.8 0.2 0.96383294 0.03612578 4.128022e-05