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 formula. The model formula specifying the Cox model structure. It must contain a Surv object to indicate survival analysis.

data

A data.frame containing the dataset to be used for model fitting. It should include all variables referenced in formula.

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 data.

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 data.

x_degree

A numeric vector indicating degrees for each covariate. It should be non-negative and match the number of covariates (i.e., ncol(data) - 2).

Details

This function checks:

Value

Returns nothing if all checks pass; otherwise, raises an error.


[Package catalytic version 0.1.0 Index]