ggresiduals method for survstan models
Usage
# S3 method for class 'survstan'
ggresiduals(object, type = c("coxsnell", "martingale", "deviance"), ...)
Details
This function produces residuals plots of Cox-Snell residuals, martingale residuals and deviance residuals.
Examples
# \donttest{
library(survstan)
ovarian$rx <- as.factor(ovarian$rx)
fit <- aftreg(Surv(futime, fustat) ~ age + rx, data = ovarian, baseline = "weibull", init = 0)
ggresiduals(fit, type = "coxsnell")
ggresiduals(fit, type = "martingale")
#> `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
ggresiduals(fit, type = "deviance")
# }