group_seq {snSMART} | R Documentation |
BJSM method for interim analysis and final analysis of group sequential trial design
Description
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.
Usage
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: |
interim |
indicates whether user is conducting an interim analysis via BJSM ( |
drop_threshold_pair |
a vector of 2 values ( |
prior_dist |
vector of three values ("prior distribution for |
pi_prior |
vector of six values (a, b, c, d, e, f), where a and b are the parameter |
beta_prior |
vector of four values ( |
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 |
DTR |
if TRUE, will also return the expected response rate of dynamic
treatment regimens. default = TRUE. only assign value to this parameter when
|
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.
(paper provided in the reference section, section 2.2.2 Bayesian decision rules. drop_threshold_tau_l and drop_threshold_psi_l correspond to tau_l
and psi_l
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/
Value
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 |
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 |
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
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.
Examples
mydata <- groupseqDATA_look1
result1 <- group_seq(
data = mydata, interim = TRUE, drop_threshold_pair = c(0.5, 0.4),
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), MCMC_SAMPLE = 6000, n.adapt = 1000, n_MCMC_chain = 1
)
summary(result1)
mydata <- groupseqDATA_full
result2 <- group_seq(
data = mydata, interim = FALSE, 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), MCMC_SAMPLE = 6000, n.adapt = 1000,
n_MCMC_chain = 1, ci = 0.95, DTR = TRUE
)
summary(result2)