Calculate the Go, NoGo and Gray Probabilities for a Clinical Trial When Outcome is Continuous Under the Bayesian Framework Using Two Metrics
Source:R/BayesDecisionProbContinuous.R
BayesDecisionProbContinuous.Rd
This function calculates Go, NoGo, and Gray probabilities for continuous 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 with multiple calculation methods.
Usage
BayesDecisionProbContinuous(
nsim,
prob,
design,
prior,
CalcMethod,
theta.TV,
theta.MAV,
theta.NULL,
nMC = NULL,
nINLAsample = NULL,
gamma1,
gamma2,
n1,
n2,
m1,
m2,
kappa01,
kappa02,
nu01,
nu02,
mu01,
mu02,
sigma01,
sigma02,
mu1,
mu2,
sigma1,
sigma2,
r = NULL,
ne1 = NULL,
ne2 = NULL,
alpha01 = NULL,
alpha02 = NULL,
seed
)
Arguments
- nsim
A positive integer representing the number of iterations for calculating posterior/posterior predictive probability.
- prob
A character string specifying the type of probability to use (
prob = 'posterior'
orprob = 'predictive'
).- design
A character string specifying the type of trial design (
design = 'controlled'
,design = 'uncontrolled'
, ordesign = 'external'
).- prior
A character string specifying the prior distribution (
prior = 'N-Inv-Chisq'
orprior = 'vague'
).- CalcMethod
A character string specifying the calculation method (
CalcMethod = 'NI'
for numerical integration,CalcMethod = 'MC'
for Monte Carlo method,CalcMethod = 'WS'
for Welch-Satterthwaite approximation, orCalcMethod = 'INLA'
for INLA).- 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'
.- nMC
A positive integer representing the number of iterations for Monte Carlo simulation (required only if
CalcMethod = 'MC'
).- nINLAsample
A positive integer representing the number of iterations for INLA sampling (required only if
CalcMethod = 'INLA'
).- 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.
- 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.
- 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.
- kappa01
A positive numeric value representing the prior precision parameter related to the mean for conjugate prior of Normal-Inverse-Chi-squared in group 1.
- kappa02
A positive numeric value representing the prior precision parameter related to the mean for conjugate prior of Normal-Inverse-Chi-squared in group 2.
- nu01
A positive numeric value representing the prior degrees of freedom related to the variance for conjugate prior of Normal-Inverse-Chi-squared in group 1.
- nu02
A positive numeric value representing the prior degrees of freedom related to the variance for conjugate prior of Normal-Inverse-Chi-squared in group 2.
- mu01
A numeric value representing the prior mean value of outcomes in group 1 for the PoC trial.
- mu02
A numeric value representing the prior mean value of outcomes in group 2 for the PoC trial.
- sigma01
A positive numeric value representing the prior standard deviation of outcomes in group 1 for the PoC trial.
- sigma02
A positive numeric value representing the prior standard deviation of outcomes in group 2 for the PoC trial.
- mu1
A numeric value representing the true mean of group 1 for PoC trial.
- mu2
A numeric value representing the true mean of group 2 for PoC trial.
- sigma1
A positive numeric value representing the true standard deviation of group 1 for PoC trial.
- sigma2
A positive numeric value representing the true standard deviation of group 2 for PoC trial.
- r
A positive numeric value representing the parameter value associated with the distribution of mean for group 2 when
design = 'uncontrolled'
.- ne1
A positive integer representing the sample size for group 1 in external trial (required for external design, can be NULL if no external treatment data).
- ne2
A positive integer representing the sample size for group 2 in external trial (required for external design, can be NULL if no external control data).
- alpha01
A positive numeric value representing the scale parameter of the power prior for group 1 (required for external design, can be NULL if no external treatment data).
- alpha02
A positive numeric value representing the scale parameter of the power prior for group 2 (required for external design, can be NULL if no external control data).
- seed
A numeric value representing the seed number for reproducible random number generation.
Value
A data frame containing the true means 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 external control design. 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
The function uses simulation to generate observed data and then applies Bayesian methods to calculate decision probabilities. Four calculation methods are available for computing the underlying probabilities: numerical integration (NI), Monte Carlo simulation (MC), Welch-Satterthwaite approximation (WS), and Integrated Nested Laplace Approximation (INLA) for external data incorporation.
Examples
# Example 1: Numerical Integration (NI) method
BayesDecisionProbContinuous(
nsim = 100, prob = 'posterior', design = 'controlled',
prior = 'N-Inv-Chisq', CalcMethod = 'NI',
theta.TV = 2, theta.MAV = 0, theta.NULL = NULL,
nMC = NULL, nINLAsample = NULL,
gamma1 = 0.8, gamma2 = 0.3,
n1 = 12, n2 = 12, m1 = NULL, m2 = NULL,
kappa01 = 5, kappa02 = 5, nu01 = 5, nu02 = 5,
mu01 = 5, mu02 = 5, sigma01 = sqrt(5), sigma02 = sqrt(5),
mu1 = 4, mu2 = 0, sigma1 = 1, sigma2 = 1,
r = NULL, ne1 = NULL, ne2 = NULL,
alpha01 = NULL, alpha02 = NULL, seed = 1
)
#> mu1 mu2 Go NoGo Gray
#> 1 4 0 0.73 0 0.27
# Example 2: Monte Carlo (MC) method
BayesDecisionProbContinuous(
nsim = 100, prob = 'posterior', design = 'controlled',
prior = 'vague', CalcMethod = 'MC',
theta.TV = 1.5, theta.MAV = -0.5, theta.NULL = NULL,
nMC = 5000, nINLAsample = NULL,
gamma1 = 0.7, gamma2 = 0.2,
n1 = 15, n2 = 15, m1 = NULL, m2 = NULL,
kappa01 = NULL, kappa02 = NULL, nu01 = NULL, nu02 = NULL,
mu01 = NULL, mu02 = NULL, sigma01 = NULL, sigma02 = NULL,
mu1 = 3, mu2 = 1, sigma1 = 1.2, sigma2 = 1.1,
r = NULL, ne1 = NULL, ne2 = NULL,
alpha01 = NULL, alpha02 = NULL, seed = 2
)
#> mu1 mu2 Go NoGo Gray
#> 1 3 1 0.74 0 0.26
# Example 3: Welch-Satterthwaite (WS) approximation method
BayesDecisionProbContinuous(
nsim = 100, prob = 'predictive', design = 'controlled',
prior = 'N-Inv-Chisq', CalcMethod = 'WS',
theta.TV = NULL, theta.MAV = NULL, theta.NULL = 1,
nMC = NULL, nINLAsample = NULL,
gamma1 = 0.8, gamma2 = 0.3,
n1 = 10, n2 = 10, m1 = 50, m2 = 50,
kappa01 = 3, kappa02 = 3, nu01 = 4, nu02 = 4,
mu01 = 2, mu02 = 2, sigma01 = 1.5, sigma02 = 1.5,
mu1 = 2.5, mu2 = 1.2, sigma1 = 1, sigma2 = 1,
r = NULL, ne1 = NULL, ne2 = NULL,
alpha01 = NULL, alpha02 = NULL, seed = 3
)
#> mu1 mu2 Go NoGo Gray
#> 1 2.5 1.2 0.23 0.34 0.43
if (FALSE) { # \dontrun{
# Example 4: INLA method with external control data
BayesDecisionProbContinuous(
nsim = 100, prob = 'posterior', design = 'external',
prior = 'vague', CalcMethod = 'INLA',
theta.TV = 1, theta.MAV = -1, theta.NULL = NULL,
nMC = NULL, nINLAsample = 3000,
gamma1 = 0.8, gamma2 = 0.2,
n1 = 12, n2 = 12, m1 = NULL, m2 = NULL,
kappa01 = NULL, kappa02 = NULL, nu01 = NULL, nu02 = NULL,
mu01 = NULL, mu02 = NULL, sigma01 = NULL, sigma02 = NULL,
mu1 = 2, mu2 = 0, sigma1 = 1, sigma2 = 1,
r = NULL, ne1 = NULL, ne2 = 20,
alpha01 = NULL, alpha02 = 0.5, seed = 4
)
} # }