Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

residuals.fitStMoMo

Extract deviance residuals of a Stochastic Mortality Model


Description

Compute deviance residuals of a fitted Stochastic Mortality Model. These residuals can be plotted using plot.resStMoMo.

Usage

## S3 method for class 'fitStMoMo'
residuals(object, scale = TRUE, ...)

Arguments

object

an object of class "fitStMoMo" with the fitted parameters of a stochastic mortality model.

scale

logical indicating whether the residuals should be scaled or not by dividing the deviance by the overdispersion of the model. Default is TRUE.

...

other arguments.

Value

An object of class "resStMoMo" with the residuals. This object has components:

residuals

a matrix with the residuals.

ages

ages corresponding to the rows in residuals.

years

years corresponding to the columns in residuals.

See Also

Examples

CBDfit <- fit(cbd(), data = central2initial(EWMaleData), ages.fit = 55:89)
CBDres <- residuals(CBDfit)
plot(CBDres)

StMoMo

Stochastic Mortality Modelling

v0.4.1
GPL (>= 2)
Authors
Andres Villegas <andresmauriciovillegas@gmail.com>, Pietro Millossovich <Pietro.Millossovich.1@city.ac.uk>, Vladimir Kaishev <Vladimir.Kaishev.1@city.ac.uk>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.