Deviance residuals for finding poorly fitted patients in cost regressions and survival models
r_D = sign(y - mu) * sqrt(d); D = sum of d over patients
Turns each patient's contribution to a fitted model's deviance into a signed residual, so the patients a cost regression or a survival curve describes worst can be found before its estimates feed a cost-effectiveness model. The generalised linear model version takes the square root of the unit deviance with the sign of the raw residual; the survival version applies the same idea to the martingale residual, treating the event indicator as a Poisson count with mean equal to the fitted cumulative hazard. The Cox-Snell residual itself, the fitted cumulative hazard, is HE-FM-CUMH-001 on the Cumulative Hazard page. Notation follows the Deviance Residual article.
Gamma unit deviance and deviance residual of one patient's cost in a generalised linear model
d = 2 * ((y - mu) / mu - log(y / mu)); r_D = (y - mu) / abs(y - mu) * sqrt(d)
Martingale residual and survival deviance residual of one patient from a fitted cumulative hazard
M = delta - H; r_D = M / abs(M) * sqrt(-2 * (M + delta * log(delta - M)))