Compile MCMC sampler using STAN and create analysis object
create_analysis_obj.Rd
Compile MCMC sampler using STAN and create analysis object
Usage
create_analysis_obj(
data_matrix,
covariates = NULL,
outcome,
borrowing,
treatment,
quiet = FALSE
)
Arguments
- data_matrix
matrix. The data matrix, including all covariates to be adjusted for, all relevant outcome variables, and treatment arm and external control arm flags.
- covariates
Covariates
. Object of classCovariates
as output by the functionadd_covariates()
.- outcome
Outcome
. Object of classOutcome
Outcome as output byexp_surv_dist()
,weib_ph_surv_dist()
, orlogistic_bin_outcome()
.- borrowing
Borrowing
. Object of classBorrowing
as output byborrowing_details()
.- treatment
Treatment
. Object of classTreatment
as output bytreatment_details()
.- quiet
logical. Whether to suppress messages (
TRUE
) or not (FALSE
, the default)
Value
Object of class Analysis
.
Examples
anls <- create_analysis_obj(
data_matrix = example_matrix,
covariates = add_covariates(
covariates = c("cov1", "cov2"),
priors = normal_prior(0, 1000)
),
outcome = exp_surv_dist(
"time",
"cnsr"
),
borrowing = borrowing_details(
"BDB",
"ext",
exponential_prior(.001),
baseline_prior = normal_prior(0, 1000)
),
treatment = treatment_details(
"trt",
normal_prior(0, 1000)
)
)
#> Inputs look good.
#> Error: CmdStan path has not been set yet. See ?set_cmdstan_path.