residuals.survreg: Residuals of a regression for survival data

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Calculates residuals for uncensored observations and quartiles and random numbers according to the conditional distribution of residuals for censored observations. See Details for an explanation.

Usage

1
2
3
4
## S3 method for class 'survreg'
residuals(object, type = "response", na.action=object, ...)
## S3 method for class 'coxph'
residuals(object, type = "CoxSnellMod", na.action=object, ...)

Arguments

object

an object inheriting from classes Survreg or coxph

type

type of residuals required

na.action

a list with component na.action, which determines the na.action for the residual component of object

...

unused

Details

For censored observations, the conditional distribution of the survival time, given the censoring, is used to calculate quantiles, see condquant

Value

matrix with class condquant

Note

BUG: residuals.coxph is not yet implemented in this way.

Author(s)

Werner A. Stahel, ETH Zurich

References

See http://stat.ethz.ch/~stahel/regression

See Also

condquant, plot.regr

Examples

1
2
3
require(survival)
t.r <- regr(Surv(time,status)~x, data=aml, family="weibull")
residuals(t.r)

regr0 documentation built on May 31, 2017, 2:26 a.m.