Learn R Programming

dnn (version 0.0.6)

residuals: Calculate Residuals for a deepAFT Fit.

Description

Calculates martingale, deviance or Cox-Snell residuals for a previously fitted (deepAFT) model.

Usage

## S3 method for class 'deepAFT'
# S3 method for dSurv
residuals(object, type = c("martingale", "deviance", "coxSnell"), ...)

Value

For martingale and deviance residuals, the returned object is a vector with one element for each subject. The row order will match the input data for the original fit.

See residuals for more detail about other output values.

Arguments

object

the results of a (deepAFT) fit.

type

character string indicating the type of residual desired. Possible values are "martingale", "deviance". Only enough of the string to determine a unique match is required.

...

other unused arguments.

Author

Bingshu E. Chen

Details

residuals.deepAFT is called to compute baseline survival function S_T0(t) from the deepAFT model deepAFT, where T0 = T/exp(mu), or log(T) = log(T) - mu.

The default method, residuals has its own help page. Use methods("residuals") to get all the methods for the residuals generic.

See Also

The default method for residuals residuals, predict.dSurv, survfit.dSurv, and deepAFT.