Skip to contents

Create a list of data in the correct format for Stan

Usage

prepare_stan_data_inputs(analysis_obj)

Arguments

analysis_obj

Analysis. Object of class Analysis created by create_analysis_obj().

Value

Named list of data inputs that correspond to items in the Stan data block.

Examples

anls_obj <- create_analysis_obj(
  data_matrix = example_matrix,
  outcome = exp_surv_dist("time", "cnsr", normal_prior(0, 100)),
  borrowing = borrowing_details(
    "BDB",
    "ext",
    exponential_prior(0.001)
  ),
  treatment = treatment_details("trt", normal_prior(0, 100))
)
#> Inputs look good.
#> Stan program compiled successfully!
#> Ready to go! Now call `mcmc_sample()`.

data_in <- psborrow2:::prepare_stan_data_inputs(anls_obj)