View source: R/pseudoglm-methods.R
residuals.pseudoglm | R Documentation |
Computes residuals according to the recommendations of Pohar-Perme and Andersen (2009) <doi: 10.1002/sim.3401>.
## S3 method for class 'pseudoglm'
residuals(object, type = NULL, ...)
object |
A pseudoglm object, as returned by cumincglm or rmeanglm |
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. |
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.
A numeric vector of residuals
Perme MP, Andersen PK. Checking hazard regression models using pseudo-observations. Stat Med. 2008;27(25):5309-5328. <doi:10.1002/sim.3401>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.