residuals.pseudoglm {eventglm} | R Documentation |
Pseudo-observation scaled residuals
Description
Computes residuals according to the recommendations of Pohar-Perme and Andersen (2009) <doi: 10.1002/sim.3401>.
Usage
## S3 method for class 'pseudoglm'
residuals(object, type = NULL, ...)
Arguments
object |
|
type |
Either "scaled" (the default for cumulative incidence outcomes) or one of the types available in residuals.glm for restricted mean outcomes, with the default being "deviance". |
... |
Arguments passed on to residuals.glm. |
Details
The scaled residuals are computed as
\hat{\epsilon}_i =
\frac{\hat{E}(V_i) - \hat{Y}_i}{\sqrt{\hat{Y}_i (1 - \hat{Y}_i)}}
When the outcome is the cumulative incidence, the denominator corresponds to an estimate of the standard error of the conditional estimate of the outcome in the absence of censoring. For the restricted mean, no such rescaling is done and the computation is passed off to residuals.glm.
Value
A numeric vector of residuals
References
Perme MP, Andersen PK. Checking hazard regression models using pseudo-observations. Stat Med. 2008;27(25):5309-5328. <doi:10.1002/sim.3401>