check_data_matrix_has_columns {psborrow2} | R Documentation |
Check Data Matrix for Required Columns
Description
Check that an Analysis
object's data_matrix
has all the required variables.
Usage
check_data_matrix_has_columns(object)
Arguments
object |
|
Value
stop()
if some columns are missing.
Examples
anls <- create_analysis_obj(
data_matrix = example_matrix,
covariates = add_covariates(
covariates = c("cov1", "cov2"),
priors = prior_normal(0, 1000)
),
outcome = outcome_surv_exponential(
"time",
"cnsr",
baseline_prior = prior_normal(0, 1000)
),
borrowing = borrowing_hierarchical_commensurate(
"ext",
prior_exponential(.001)
),
treatment = treatment_details(
"trt",
prior_normal(0, 1000)
)
)
check_data_matrix_has_columns(anls)
[Package psborrow2 version 0.0.3.4 Index]