residuals.survstan | R Documentation |
residuals method for survstan models
## S3 method for class 'survstan'
residuals(object, type = c("coxsnell", "martingale", "deviance"), ...)
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. |
This function extracts the residuals, martingale residuals and deviance residuals of a survstan object.
a vector containing the desired residuals.
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.