= Solution
Fit the <Cox proportional-hazards model> with the other explanatory variables, initially omitting the variable $z$ whose form is being assessed, and plot the resulting <martingale residuals> against $z$. Add a smooth trend, for example using a <cubic spline> or a local smoother. A systematic pattern indicates that $z$ affects the <hazard function>; the shape helps suggest a linear term, a transformation, or a nonlinear spline term in the log hazard.
Refit with the proposed form and inspect <martingale residuals> against $z$ again. Under an adequate functional form, their conditional mean should have no systematic trend, allowing for model fitting and the other covariates. Compare plausible alternative forms using the <partial likelihood> and suitable model checks.
\b[Use the smoothed pattern to assess the covariate's functional form, rather than treating these residuals as normal regression errors.] <Martingale residuals> are asymmetric, bounded above by 1, and can be arbitrarily negative; the raw residual plot can therefore be misleading without smoothing. This diagnostic concerns the covariate form, and does not by itself test the <proportional hazards> assumption.
Back to article page