BJSM_binary function

BJSM for snSMART (3 active treatments/placebo and 2 dose level) with binary outcome

BJSM for snSMART (3 active treatments/placebo and 2 dose level) with binary outcome

This function implements the BJSM (Bayesian Joint Stage Modeling) method which borrows information across both stages to estimate the individual response rate of each treatment/dose level in a snSMART design with binary outcomes.

BJSM_binary( data, prior_dist, pi_prior, normal.par, beta_prior, n_MCMC_chain = 1, n.adapt, BURN.IN = 100, thin = 1, MCMC_SAMPLE, ci = 0.95, six = TRUE, DTR = TRUE, jags.model_options = NULL, coda.samples_options = NULL, verbose = FALSE, ... ) ## S3 method for class 'summary.BJSM_binary' print(x, ...) ## S3 method for class 'BJSM_binary' print(x, ...) ## S3 method for class 'summary.BJSM_dose_binary' print(x, ...) ## S3 method for class 'BJSM_dose_binary' print(x, ...)

Arguments

  • data: trial data with 4 columns: treatment_stageI, response_stageI, treatment_stageII and response_stageII. Missing data is allowed in stage 2.

  • prior_dist: for 3 active treatment design: 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"); for dose level design: vector of two values ("prior distribution for pi_P", "prior distribution for beta")

  • pi_prior: for 3 active treatment design: 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. for dose level design: vector of two values (a, b). a is the parameter a of the prior distribution for pi (response rate) of placebo. b is the parameter b of the prior distribution for pi of placebo. Please check the Details section for more explanation

  • normal.par: for dose level design: vector of two values (normal.mean, normal.var). our function assumes that the logarithm of treatment effect ratio follows a Gaussian prior distribution N(μ,σ2)N(\mu, \sigma^2), that is log(πL/πP) N(normal.mean,normal.var)log(\pi_L/\pi_P)~N(normal.mean, normal.var), and log(πH/πP) N(normal.mean,normal.var)log(\pi_H/\pi_P)~N(normal.mean, normal.var). normal.mean is the mean of this Gaussian prior. normal.var is the variance of this Gaussian prior distribution

  • beta_prior: for 3 active treatment design: vector of four values (a, b, c, d). a is the value of parameter a of the prior distribution for linkage parameter beta_0 or beta_0m, b is the value of parameter b of the prior distribution for linkage parameter beta_0 or beta_0m. c

    is the value of parameter a of the prior distribution for linkage parameter beta_1 or beta_1m. d is the value of parameter b of the prior distribution for linkage parameter beta_1 or beta_1m. for dose level design: vector of two values (a, b). a is the parameter a of the prior distribution for linkage parameter beta. b is the parameter b of the prior distribution for linkage parameter beta. Please check the Details

    section for more explanation

  • n_MCMC_chain: number of MCMC chains, default to 1.

  • n.adapt: the number of iterations for adaptation

  • BURN.IN: number of burn-in iterations for MCMC

  • thin: thinning interval for monitors

  • MCMC_SAMPLE: number of iterations for MCMC

  • ci: coverage probability for credible intervals, default = 0.95

  • six: TRUE or FALSE. If TRUE, will run the six beta model (allow for estimating beta_0m and beta_1m values that differ among different treatments m), if FALSE will run the two beta model. default = TRUE. Only need to specify this for 3 active treatment design.

  • DTR: TRUE or FALSE. If TRUE, will also return the expected response rate of dynamic treatment regimens. default = TRUE. Only need to specify this for 3 active treatment design.

  • 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

  • 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(P), ci_pi_B(L), ci_pi_C(H): x% credible intervals for treatment A(P), B(L), C(H)

  • diff_AB(PL), diff_BC(LH). diff_AC(PH): estimate of differences between treatments A(P) and B(L), B(L) and C(H), A(P) and C(H)

  • ci_diff_AB(PL), ci_diff_BC(LH), ci_diff_AC(PH): x% credible intervals for the estimated differences between treatments A(P) and B(L), B(L) and C(H), A(P) and C(H)

  • se_AB(PL), se_BC(LH), se_AC(PH): standard error for the estimated differences between treatments A(P) and B(L), B(L) and C(H), A(P) and C(H)

  • 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. The first stage response rate is denoted as πm\pi_m for treatment mm. In the two β\beta model, the second stage response rate for first stage responders is equal to β1πm\beta_1\pi_m. For nonresponders to treatment mm in the first stage who receive treatment mm' in the second the stage, the second stage response rate in the second stage is equal to β0πm\beta_0\pi_{m'}. In the six β\beta model, the second stage response rate of the first stage responders to treatment m is denoted by β1mπm\beta_{1m}\pi_m, and the second stage response rate of the non-responders to first stage treatment mm who receive treatment mm' in the second stage is denoted by β0mπm\beta_{0m}\pi_{m'}. All the β\betas are linkage parameters.

Please refer to the paper listed under reference section for standard snSMART trial design and 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/

Examples

mydata <- data_binary BJSM_result <- BJSM_binary( data = mydata, prior_dist = c("beta", "beta", "pareto"), pi_prior = c(0.4, 1.6, 0.4, 1.6, 0.4, 1.6), beta_prior = c(1.6, 0.4, 3, 1), n_MCMC_chain = 1, n.adapt = 1000, MCMC_SAMPLE = 2000, ci = 0.95, six = TRUE, DTR = TRUE, verbose = FALSE ) BJSM_result2 <- BJSM_binary( data = mydata, prior_dist = c("beta", "beta", "pareto"), pi_prior = c(0.4, 1.6, 0.4, 1.6, 0.4, 1.6), beta_prior = c(1.6, 0.4, 3, 1), n_MCMC_chain = 1, n.adapt = 10000, MCMC_SAMPLE = 60000, ci = 0.95, six = FALSE, DTR = FALSE, verbose = FALSE ) summary(BJSM_result) summary(BJSM_result2) data <- data_dose BJSM_dose_result <- BJSM_binary( data = data_dose, prior_dist = c("beta", "gamma"), pi_prior = c(3, 17), normal.par = c(0.2, 100), beta_prior = c(2, 2), n_MCMC_chain = 2, n.adapt = 1000, MCMC_SAMPLE = 6000, ci = 0.95, verbose = FALSE ) summary(BJSM_dose_result)

References

Wei, B., Braun, T.M., Tamura, R.N. and Kidwell, K.M., 2018. A Bayesian analysis of small n sequential multiple assignment randomized trials (snSMARTs). Statistics in medicine, 37(26), pp.3723-3732. URL: doi:10.1002/sim.7900

Chao, Y.C., Trachtman, H., Gipson, D.S., Spino, C., Braun, T.M. and Kidwell, K.M., 2020. Dynamic treatment regimens in small n, sequential, multiple assignment, randomized trials: An application in focal segmental glomerulosclerosis. Contemporary clinical trials, 92, p.105989. URL: doi:10.1016/j.cct.2020.105989

Fang, F., Hochstedler, K.A., Tamura, R.N., Braun, T.M. and Kidwell, K.M., 2021. Bayesian methods to compare dose levels with placebo in a small n, sequential, multiple assignment, randomized trial. Statistics in Medicine, 40(4), pp.963-977. URL: doi:10.1002/sim.8813

See Also

LPJSM_binary

sample_size

  • Maintainer: Michael Kleinsasser
  • License: GPL (>= 2)
  • Last published: 2024-10-16