\(M_i = \delta_i - \exp(x_i'\beta)\hat H_0(t_i)\): observed events minus expected. Bounded above by 1 and unbounded below, hence strongly left-skewed – do not read them as if they were normal. Their use is functional form: plot them against a covariate not in the model, and curvature tells you the scale it belongs on.
Arguments
- fit
a fit from
morie_efron_tie_correctionormorie_breslow_tie_correction.
References
Therneau, T. M., Grambsch, P. M. and Fleming, T. R. (1990). Martingale-based residuals for survival models. Biometrika, 77(1), 147-160.
Examples
if (requireNamespace("ranger", quietly = TRUE)) {
set.seed(1)
X <- matrix(rnorm(60), ncol = 1)
tt <- rexp(60, exp(X * 0.5))
f <- morie_efron_tie_correction(tt, rep(1, 60), X)
round(mean(morie_cox_martingale_residuals(f)$residuals), 8)
}
#> [1] 0
