Trim model matrix to just include relevant columns
trim_data_matrix.Rd
Take an Analysis
object's data_matrix
and remove
everything unnecessary in preparation of making input data for Stan
Arguments
- analysis_obj
Analysis
. An object of classAnalysis
as created through.create_analysis_obj()
.
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",
baseline_prior = normal_prior(0, 1000)
),
borrowing = borrowing_details(
"BDB",
"ext",
exponential_prior(.001)
),
treatment = treatment_details(
"trt",
normal_prior(0, 1000)
)
)
#> Inputs look good.
#> Stan program compiled successfully!
#> Ready to go! Now call `mcmc_sample()`.
trimmed_mat <- psborrow2:::trim_data_matrix(anls)