| cox_qp_score_function | R Documentation |
Computes the score (gradient of partial log-likelihood) in the format
expected by lgspline's qp_score_function interface. The block-
diagonal design matrix \mathbf{X} and response \mathbf{y} are
in partition order; this function internally sorts by event time, computes
the Cox score using the Breslow approximation for tied event times, and
returns the result in the original partition order.
cox_qp_score_function(
X,
y,
mu,
order_list,
dispersion,
VhalfInv,
observation_weights,
status
)
X |
Block-diagonal design matrix (N x P). |
y |
Response vector (survival times, N x 1). |
mu |
Predicted values (N x 1), same order as X and y. |
order_list |
List of observation indices per partition. |
dispersion |
Dispersion (fixed at 1). |
VhalfInv |
Inverse square root correlation matrix (NULL for independent observations). |
observation_weights |
Observation weights. |
status |
Event indicator (1 = event, 0 = censored). |
Numeric column vector of length P (gradient w.r.t. coefficients).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.