residuals {dnn}R Documentation

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 class 'dSurv'
residuals(object, type = c("martingale", "deviance", "coxSnell"), ...)

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.

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.

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.

Note

For deviance residuals, the status variable may need to be reconstructed.

Author(s)

Bingshu E. Chen

See Also

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


[Package dnn version 0.0.6 Index]