| validate_cox_initialization_input | R Documentation |
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.
validate_cox_initialization_input(
formula,
data,
syn_size,
hazard_constant,
entry_points,
x_degree
)
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., |
This function checks:
That syn_size, hazard_constant, entry_points, and x_degree are positive values.
That formula includes a Surv object to be suitable for Cox models.
That data is a data.frame.
The complexity of formula to ensure it has fewer terms than the number of columns in data.
The length of x_degree and entry_points to match the dimensions of data.
If the conditions are not met, descriptive error messages are returned.
Returns nothing if all checks pass; otherwise, raises an error.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.