BJSM_c {snSMART} | R Documentation |
BJSM continuous (snSMART with three active treatments and a continuous outcome design)
Description
BJSM (Bayesian Joint Stage Modeling) method that borrows information across both stages to estimate the individual response rate of each treatment (with continuous outcome and a mapping function).
Usage
BJSM_c(
data,
xi_prior.mean,
xi_prior.sd,
phi3_prior.sd,
n_MCMC_chain,
n.adapt,
MCMC_SAMPLE,
ci = 0.95,
n.digits,
thin = 1,
BURN.IN = 100,
jags.model_options = NULL,
coda.samples_options = NULL,
verbose = FALSE,
...
)
## S3 method for class 'BJSM_c'
summary(object, ...)
## S3 method for class 'summary.BJSM_c'
print(x, ...)
## S3 method for class 'BJSM_c'
print(x, ...)
Arguments
data |
trial ddatset with columns: |
xi_prior.mean |
a 3-element vector of mean of the prior distributions
(normal distribution) for |
xi_prior.sd |
a 3-element vector of standard deviation of the prior distributions
(normal distribution) for |
phi3_prior.sd |
standard deviation of the prior distribution (folded normal
distribution) of |
n_MCMC_chain |
number of MCMC chains, default to 1 |
n.adapt |
the number of iterations for adaptation |
MCMC_SAMPLE |
number of iterations for MCMC |
ci |
coverage probability for credible intervals, default = 0.95 |
n.digits |
number of digits to keep in the final estimation of treatment effect |
thin |
thinning interval for monitors |
BURN.IN |
number of burn-in iterations for MCMC |
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. |
object |
object to summarize. |
x |
object to print |
Details
section 2.2.1 and 2.2.2 of the paper listed under reference
provides a detailed
description of the assumptions and prior distributions of the model.
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 |
mean_estimate |
BJSM estimate of each parameter:
|
ci_estimate |
x% credible interval for each parameter. By default round to
2 decimal places, if more decimals are needed, please access the results by
|
References
Hartman, H., Tamura, R.N., Schipper, M.J. and Kidwell, K.M., 2021. Design and analysis considerations for utilizing a mapping function in a small sample, sequential, multiple assignment, randomized trials with continuous outcomes. Statistics in Medicine, 40(2), pp.312-326.
Examples
trialData <- trialDataMF
BJSM_result <- BJSM_c(
data = trialData, xi_prior.mean = c(50, 50, 50),
xi_prior.sd = c(50, 50, 50), phi3_prior.sd = 20, n_MCMC_chain = 1,
n.adapt = 1000, MCMC_SAMPLE = 5000, BURIN.IN = 1000, ci = 0.95, n.digits = 5, verbose = FALSE
)
summary(BJSM_result)
print(BJSM_result)