This function calculates the sample size and Bayesian hybrid design parameters using dynamic power prior framework.
DPP(
pt,
pc,
pch,
pc.calib,
nch,
nc.range = NULL,
r,
q,
alpha = 0.1,
power = 0.8,
delta_threshold = 0.1,
method = "Empirical Bayes",
theta = 0.5,
eta = 1,
a0c = 0.001,
b0c = 0.001,
a0t = 0.001,
b0t = 0.001,
nsim = 1e+05,
seed = NULL
)An object with values
alpha: nominal type I error rate
power: The calculated power by simulation.
type1err: empirical type I error rate.
tau: The calibrated threshold for statistical significance.
nt: sample size for experimental arm
nc: sample size for control arm
nche: maximum amount of borrowing in terms of number of subjects
delta.bound: significance boundary of delta between the study experimental group and study control group
mean.PMD: mean of posterior mean difference over nsim estimates
sd.PMD: standard deviation of posterior mean difference over nsim estimates
mean_pc_hca: a vector of nsim length. Storing the posterior means of pc based on hybrid control for nsim replications.
mean_pc_c: a vector of nsim length. Storing the posterior means of pc based on study control for nsim replications.
A scalar. Response rate for experimental arm in current study.
A scalar. Response rate for control arm in current study.
A scalar. Response rate for control treatment in historical study.
A scalar. Response rate for control arm in current study for calibration. Usually, pc.calib = pch.
A scalar. Total number of patients in historical control.
A vector with length = 2. Search range for nc. Default is NULL, and the range will be automatically determined.
A scalar. Randomization ratio for current study. r=1 means 1:1 and r=2 means 2:1.
A scalar. Specification of n_che in terms of times of nc; i.e. n_che = q*nc. Usually, q >= 1 and q <= nch/n_che.
A scalar. One sided type I error rate.
A scalar. Power. Default 0.8.
Borrow when abs(pc_hat (current study) - pch) <= delta_threshold. Default 0.1.
A string characters. Method for dynamic borrowing, "Empirical Bayes", "Bayesian p", "Generalized BC", "JSD". Default "Empirical Bayes".
A scalar parameter with a range of (0, 1), and applicable to method: "Generalized BC". Default 0.5.
A scalar parameter with a range of (0, infty), and applicable to method: "Bayesian p", "Generalized BC", "JSD". "Generalized BC" method requires two parameters theta and eta. Default 1.
A scalar. Hyperprior for control response rate beta(a0c, b0c). Default 0.001.
A scalar. Hyperprior for control response rate beta(a0c, b0c). Default 0.001.
A scalar. Hyperprior for experimental response rate beta(a0t, b0t). Default 0.001.
A scalar. Hyperprior for experimental response rate beta(a0t, b0t). Default 0.001.
A scalar. Number of replications to calculate power. Default 100,000.
A scalar. seed for simulations. Default NULL.
# \donttest{
o <- DPP(pt = 0.5, pc = 0.3, pch = 0.3, pc.calib = 0.3, nch = 200, nc.range = NULL,
r = 2, q = 1, alpha = 0.1, power = 0.8,
delta_threshold = 0.1,
method = "Empirical Bayes", theta = 0.5, eta = 1,
a0c = 0.001, b0c = 0.001, a0t = 0.001, b0t = 0.001,
nsim = 1000, seed = 2000)
print(o)
# }
Run the code above in your browser using DataLab