BJSM_binary {snSMART} | R Documentation |
BJSM for snSMART (3 active treatments/placebo and 2 dose level) with binary outcome
Description
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.
Usage
BJSM_binary(
data,
prior_dist,
pi_prior,
normal.par,
beta_prior,
n_MCMC_chain,
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: |
prior_dist |
for 3 active treatment design: vector of three values
("prior distribution for |
pi_prior |
for 3 active treatment design: vector of six values (a, b, c, d, e, f),
where a and b are the parameter |
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 |
beta_prior |
for 3 active treatment design: vector of four values (a, b, c, d).
|
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
|
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 |
coda.samples_options |
a list of optional arguments that are passed to |
verbose |
TRUE or FALSE. If FALSE, no function message and progress bar will be printed. |
... |
further arguments. Not currently used. |
x |
object to summarize. |
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 \pi_m
for treatment m
. In the two \beta
model, the second stage response rate for first stage responders is equal to \beta_1\pi_m
. For nonresponders to treatment m
in the first stage who
receive treatment m'
in the second the stage, the second stage response rate in the second stage is equal to \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 \beta_{1m}\pi_m
, and the second stage response rate of the non-responders
to first stage treatment $m$ who receive treatment m'
in the second stage is denoted by \beta_{0m}\pi_{m'}
. All the \beta
s 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/
Value
posterior_sample |
an |
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 |
se_beta0_hat , se_beta1_hat |
standard error of the estimated value of linkage
parameter |
ci_beta0_hat , ci_beta1_hat |
linkage parameter |
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 |
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.
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.
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.
See Also
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)