Description Usage Arguments Details Value See Also Examples

View source: R/residuals.flexsurvreg.R

Calculates residuals for `flexsurvreg`

or `flexsurvspline`

model fits.

1 2 |

`object` |
Output from |

`type` |
Character string for the type of residual desired. Currently only |

`...` |
Not currently used. |

Residuals of `type = "response"`

are calculated as the naive difference between the observed survival and the covariate-specific predicted mean survival from `predict.flexsurvreg`

, ignoring whether the event time is observed or censored.

Numeric vector with the same length as `nobs(object)`

.

1 2 | ```
fitg <- flexsurvreg(formula = Surv(futime, fustat) ~ age, data = ovarian, dist = "gengamma")
residuals(fitg)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.