= Solution
At event time $t_j$, the vector <Schoenfeld residual> is
$$
\boxed{r_j=z_{i_j}-\bar z_j(\widehat\beta),}
$$
where $\widehat\beta$ is the fitted partial-likelihood coefficient. It compares the <covariate> of the person who actually failed with the <covariate> <mean> predicted for the failing person, using the fitted <hazard> weights over the <risk set>. Under the model at the true coefficient, the conditional expected failing <covariate> is precisely that weighted <mean>, so the corresponding <Schoenfeld function> is conditionally centered at zero. Residuals are defined at observed events, not at censoring times.
The score equation from part (a) is exactly
$$
U(\beta)=\sum_j[z_{i_j}-\bar z_j(\beta)].
$$
At a finite interior unpenalized maximum, $U(\widehat\beta)=0$, so
$$
\boxed{\sum_j r_j=0.}
$$
This is the intended fitted-residual identity. For an arbitrary trial coefficient it is a score, not generally zero; a single event with <covariates> zero and one in its <risk set> can have Schoenfeld function $1/2$ at $\beta=0$. Penalized estimates or a boundary maximum also need their own score conditions rather than this unqualified zero-sum assertion.
Back to article page