r_i = H0(t_i) exp(x_i' beta) = delta_i - M_i, the fitted cumulative hazard. If the model is right these behave like a censored unit exponential sample.
References
Cox, D. R. and Snell, E. J. (1968). A general definition of residuals. JRSS-B 30(2), 248-275.
Examples
Coxsnell(time = c(1, 2, 3, 4, 5, 6, 7, 8), event = c(0, 1, 0, 1, 1, 0, 1, 0),
X = c(1, 2, 3, 4, 5, 6, 7, 8), beta = 0.5)
#> $residuals
#> [1] 0.00000000 0.02019966 0.03330361 0.11292059 0.28771090 0.47435509 1.15961999
#> [8] 1.91189015
#>
#> $diagnostic_x
#> [1] 0.02019966 0.11292059 0.28771090 1.15961999
#>
#> $diagnostic_h
#> [1] 0.1428571 0.3428571 0.5928571 1.0928571
#>
#> $max_deviation
#> [1] 0.3051462
#>
#> $n
#> [1] 8
#>
#> $reference
#> [1] "unit exponential; the Nelson-Aalen hazard of the residuals should follow the 45-degree line"
#>
#> $in_sample_check
#> [1] TRUE
#>
#> $method
#> [1] "r_i = H0(t_i) exp(x_i' beta) = delta_i - M_i"
#>
