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: id, trt1 (treatment 1), stage1outcome, stay (stay = 1 if patient stay on the same treatment in stage 2, otherwise stay = 0), trt2 (treatment 2), stage2outcome

xi_prior.mean

a 3-element vector of mean of the prior distributions (normal distribution) for xis (treatment effect). Please check the Details section for more explaination

xi_prior.sd

a 3-element vector of standard deviation of the prior distributions (normal distribution) for xis (treatment effect). Please check the Details section for more explaination

phi3_prior.sd

standard deviation of the prior distribution (folded normal distribution) of phi3 (if the patient stays on the same treatment, phi3 is the cumulative effect of stage 1 that occurs on the treatment longer term). Please check the Details section for more explaination

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 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.

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 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

mean_estimate

BJSM estimate of each parameter:

  1. phi1 - lingering effect of the first treatment

  2. phi3 - if the patient stays on the same treatment, phi3 is the cumulative effect of stage 1 that occurs on the treatment longer term

  3. xi_j - the expected effect of treatment j, j = 1, 2, 3 in the first stage

  4. V1,V2 are the variance-covariance matrix of the multivariate distribution. V1 is for patients who stay on the same treatment, and V2 is for patients who switch treatments.

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 ⁠[YourResultName]$ci_estimates$CI_low⁠ or ⁠[YourResultName]$ci_estimates$CI_high⁠

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)

[Package snSMART version 0.2.3 Index]