## S3 method for class 'survstan'residuals(object, type = c("coxsnell","martingale","deviance"),...)
Arguments
object: a fitted model object of the class survstan.
type: type of residuals desired: coxsnell (default), martingale and deviance.
...: further arguments passed to or from other methods.
Returns
a vector containing the desired residuals.
Details
This function extracts the residuals, martingale residuals and deviance residuals of a survstan object.
Examples
library(survstan)ovarian$rx <- as.factor(ovarian$rx)fit <- aftreg(Surv(futime, fustat)~ age + rx, data = ovarian, baseline ="weibull", init =0)residuals(fit, type ="coxsnell")residuals(fit, type ="martingale")residuals(fit, type ="deviance")