validate_cox_initialization_input {catalytic} | R Documentation |
Validate Inputs for Catalytic Cox proportional hazards model (COX) Initialization
Description
This function performs validation checks on input parameters for initializing a catalytic Cox proportional hazards model. It ensures that essential parameters meet requirements, such as being of the correct type, appropriate length, and having valid values.
Usage
validate_cox_initialization_input(
formula,
data,
syn_size,
hazard_constant,
entry_points,
x_degree
)
Arguments
formula |
An object of class |
data |
A |
syn_size |
A positive integer indicating the size of the synthetic dataset. It is recommended that this value is at least four times the number of columns in |
hazard_constant |
A positive numeric value representing the hazard constant for the Cox model. |
entry_points |
A numeric vector representing entry times for observations. This vector should be non-negative and have a length equal to the number of rows in |
x_degree |
A numeric vector indicating degrees for each covariate. It should be non-negative and match the number of covariates (i.e., |
Details
This function checks:
That
syn_size
,hazard_constant
,entry_points
, andx_degree
are positive values.That
formula
includes aSurv
object to be suitable for Cox models.That
data
is adata.frame
.The complexity of
formula
to ensure it has fewer terms than the number of columns indata
.The length of
x_degree
andentry_points
to match the dimensions ofdata
. If the conditions are not met, descriptive error messages are returned.
Value
Returns nothing if all checks pass; otherwise, raises an error.