ggresiduals.survstan {survstan}R Documentation

ggresiduals method for survstan models

Description

ggresiduals method for survstan models

Usage

## S3 method for class 'survstan'
ggresiduals(object, type = c("coxsnell", "martingale", "deviance"), ...)

Arguments

object

a fitted model object of the class survstan.

type

type of residuals used in the plot: coxsnell (default), martingale and deviance.

...

further arguments passed to or from other methods.

Details

This function produces residuals plots of Cox-Snell residuals, martingale residuals and deviance residuals.

Value

the desired residual plot.

Examples


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")
ggresiduals(fit, type = "deviance")



[Package survstan version 0.0.7.1 Index]