Calculates statistical power and other design parameters for a Bayesian Hybrid Design using a dynamic power prior approach, based on simulations.
power.DPP(
pt,
nt,
pc,
nc,
pc.calib,
pch,
nche,
nch,
alpha = 0.1,
tau = NULL,
a0c = 0.001,
b0c = 0.001,
a0t = 0.001,
b0t = 0.001,
delta_threshold = 0.1,
method = "Empirical Bayes",
theta = 0.5,
eta = 1,
datamat = NULL,
w0 = NULL,
nsim = 1e+05,
seed = NULL
)A large list containing the power, the calibrated tau, all input
parameters, and detailed simulation results such as:
The calculated statistical power.
The calibrated significance threshold.
The mean and standard deviation of the posterior mean difference between the hybrid and concurrent controls.
The minimum detectable difference in response rates.
A vector of posterior probabilities
P(pt > pc | data) for each of the nsim simulations.
Vectors of the posterior means for the hybrid and concurrent control arms for each simulation.
A matrix of the simulated response counts used.
A vector of the final borrowing weights used in each simulation.
and all input parameters.
Numerics. The response rates for the experimental and control arms, respectively.
Integers. The sample sizes for the experimental and control arms, respectively.
A scalar numeric. The control response rate assumed for
calibrating the type I error threshold, tau. Often pc.calib = pch.
Numeric and integer. The response rate and sample size of the historical control arm.
An integer. The effective number of subjects to be borrowed, used for calculating the global borrowing weight.
A scalar numeric. The one-sided Type I error rate, used for
calibration if tau is not provided.
(Optional) A scalar numeric. The pre-calibrated threshold for
statistical significance. If NULL, it will be calculated internally.
Numerics. Hyperparameters for the Beta priors on the response rates.
A scalar numeric. The similarity threshold for borrowing.
A string specifying the dynamic borrowing method.
Numerics. Additional parameters for certain borrowing methods.
(Optional) A matrix with nsim rows and 2 columns
(experimental, control) of pre-simulated response counts.
(Optional) A scalar numeric. A fixed borrowing weight to override the dynamic calculation.
An integer. The number of simulations to run.
An integer. A seed for the random number generator. Default NULL.
# \donttest{
o <- power.DPP(pt=0.5, nt=40, pc=0.3, nc=40, pc.calib = 0.3, pch=0.3,
nche=40, nch=180, alpha=0.1, nsim = 1000, seed=2000) # nsim is reduced
# }
Run the code above in your browser using DataLab