get_cox_gradient | R Documentation |
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)
X |
A matrix of covariates (design matrix) for the Cox model. |
time |
A numeric vector of event times. |
status |
A numeric vector of event indicators (1 for event, 0 for censored). |
coefs |
A numeric vector of coefficients for the Cox model. |
entry_points |
A numeric vector of entry times for the subjects. Defaults to 0. |
A numeric vector representing the gradient of the Cox proportional hazards model.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.