Solution (source code)

= Solution

For the fitted <Cox proportional-hazards model>,
$$
\widehat M_i
=v_i-e^{\widehat\beta z_i}\widehat H_0(x_i),
$$
where $\widehat H_0$ is the fitted baseline cumulative hazard, usually obtained with the <Breslow estimator>.