= Solution
Taking logarithms of the <Cox partial likelihood> gives
$$
S(\beta)=\sum_{i=1}^n v_i\left[\beta z_i-\log\left(\sum_{j:x_j\geq x_i}e^{\beta z_j}\right)\right].
$$
Differentiate each term, using the <chain rule> for the logarithm:
$$
\boxed{S'(\beta)=\sum_{i=1}^n v_i\left[z_i-
\frac{\sum_{j:x_j\geq x_i}z_j e^{\beta z_j}}{\sum_{j:x_j\geq x_i}e^{\beta z_j}}\right].}
$$
This <score function> is the sum over failures of the observed covariate minus its current risk-weighted mean. Define that mean as $\overline z_\beta(x_i)$; observations with $v_i=0$ have no direct event term, although they occur in the relevant <risk sets>.
Back to article page