Check Data Matrix for Required Columns
check_data_matrix_has_columns.Rd
Check that an Analysis
object's data_matrix
has all the required variables.
Value
stop()
if some columns are missing.
Examples
anls <- psborrow2:::.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)
),
ready_to_sample = FALSE
)
check_data_matrix_has_columns(anls)