BJSM method for interim analysis and final analysis of group sequential trial design
BJSM method for interim analysis and final analysis of group sequential trial design
After obtain real trial data, this function can be used to decide which arm to drop in an interim analysis or provide a full final analysis.
group_seq( data, interim =TRUE, drop_threshold_pair =NULL, prior_dist, pi_prior, beta_prior, MCMC_SAMPLE, n.adapt, thin =1, BURN.IN =100, n_MCMC_chain, ci =0.95, DTR =TRUE, jags.model_options =NULL, coda.samples_options =NULL, verbose =FALSE,...)## S3 method for class 'summary.group_seq'print(x,...)## S3 method for class 'group_seq'print(x,...)
Arguments
data: dataset should include 8 columns: time.1st.trt (first treatment starts time), time.1st.resp (first response time), time.2nd.trt (second treatment starts time), time.2nd.resp (second response time), trt.1st (treatment arm for first treatment), resp.1st (response for first treatment), trt.2nd (treatment arm for second treatment), resp.2nd (response for second treatment) data yet to be observed should be marked as "NA"
interim: indicates whether user is conducting an interim analysis via BJSM (interim = TRUE) or an final analysis via BJSM (interim = FALSE)
drop_threshold_pair: a vector of 2 values (drop_threshold_tau_l, drop_threshold_psi_l). Both drop_threshold_tau_l and drop_threshold_psi_l should be between 0 and 1. only assign value to this parameter when interim = TRUE. See the details section for more explanation
prior_dist: vector of three values ("prior distribution for pi", "prior distribution for beta0", "prior distribution for beta1"), user can choose from "gamma", "beta", "pareto". e.g. prior_dist = c("beta", "beta", "pareto")
pi_prior: vector of six values (a, b, c, d, e, f), where a and b are the parameter a and parameter b of the prior distribution for pi_1A, c and d are the parameter a and parameter b of the prior distribution for pi_1B, and e and f are the parameter a and parameter b of the prior distribution for pi_1C. Please check the Details section for more explanation
beta_prior: vector of four values (beta0_prior.a, beta0_prior.b, beta1_prior.a, beta1_prior.c). beta0_prior.a is the parameter a of the prior distribution for linkage parameter beta0. beta0_prior.b is the parameter b of the prior distribution for linkage parameter beta0. beta1_prior.a is the parameter a of the prior distribution for linkage parameter beta1. beta1_prior.c is the parameter b of the prior distribution for linkage parameter beta1. Please check the Details section for more explanation
MCMC_SAMPLE: number of iterations for MCMC
n.adapt: the number of iterations for adaptation
thin: thinning interval for monitors
BURN.IN: number of burn-in iterations for MCMC
n_MCMC_chain: number of MCMC chains, default to 1
ci: coverage probability for credible intervals, default = 0.95. only assign value to this parameter when interim = FALSE.
DTR,: if TRUE, will also return the expected response rate of dynamic treatment regimens. default = TRUE. only assign value to this parameter when interim = FALSE.
jags.model_options: a list of optional arguments that are passed to jags.model() function.
coda.samples_options: a list of optional arguments that are passed to coda.samples() function.
verbose: TRUE or FALSE. If FALSE, no function message and progress bar will be printed.
...: further arguments. Not currently used.
x: object to summarize.
Returns
if interim = TRUE, this function returns either 0 - no arm is dropped, or A/B/C - arm A/B/C is dropped
if interim = FALSE, this function returns:
posterior_sample: an mcmc.list object generated through the coda.samples() function, which includes posterior samples of the link parameters and response rates generated through the MCMC process
pi_hat_bjsm: estimate of response rate/treatment effect
se_hat_bjsm: standard error of the response rate
ci_pi_A, ci_pi_B, ci_pi_C: x% credible intervals for treatment A, B, C
diff_AB, diff_BC. diff_AC: estimate of differences between treatments A and B, B and C, A and C
ci_diff_AB, ci_diff_BC, ci_diff_AC: x% credible intervals for the differences between treatments A and B, B and C, A and C
se_AB, se_BC, se_AC: standard error for the differences between treatments A and B, B and C, A and C
beta0_hat, beta1_hat: linkage parameter beta0 and beta1 estimates
se_beta0_hat, se_beta1_hat: standard error of the estimated value of linkage parameter beta0 and beta1
ci_beta0_hat, ci_beta1_hat: linkage parameter beta0 and beta1
credible interval
pi_DTR_est: expected response rate of dynamic treatment regimens (DTRs)
pi_DTR_se: standard error for the estimated DTR response rate
ci_pi_AB, ci_pi_AC, ci_pi_BA, ci_pi_BC, ci_pi_CA, ci_pi_CB: x% credible intervals for the estimated DTR response rate
Details
For gamma distribution, prior.a is the shape parameter r, prior.b is the rate parameter lambda. For beta distribution, prior.a is the shape parameter a, prior.b is the shape parameter b. For pareto distribution, prior.a is the scale parameter alpha, prior.b is the shape parameter c (see jags user manual). The individual response rate is regarded as a permanent feature of the treatment. The second stage outcome is modeled conditionally on the first stage results linking the first and second stage response probabilities through linkage parameters.
(paper provided in the reference section, section 2.2.2 Bayesian decision rules. drop_threshold_tau_l and drop_threshold_psi_l correspond to taul and psil respectively)
Please refer to the paper listed under reference section for detailed definition of parameters. Note that this package does not include the JAGS library, users need to install JAGS separately. Please check this page for more details: https://sourceforge.net/projects/mcmc-jags/
Chao, Y.C., Braun, T.M., Tamura, R.N. and Kidwell, K.M., 2020. A Bayesian group sequential small n sequential multiple‐assignment randomized trial. Journal of the Royal Statistical Society: Series C (Applied Statistics), 69(3), pp.663-680. URL: doi:10.1111/rssc.12406