This function computes the gradient for the Cox proportional hazards model. The gradient is calculated by considering the contributions of each observation to the gradient based on the risk set at each event time.
get_cox_gradient(X, time, status, coefs, entry_points)
A numeric vector representing the gradient of the Cox proportional hazards model.
A matrix of covariates (design matrix) for the Cox model.
A numeric vector of event times.
A numeric vector of event indicators (1 for event, 0 for censored).
A numeric vector of coefficients for the Cox model.
A numeric vector of entry times for the subjects. Defaults to 0.