Skip to contents

Returns the residual degrees of freedom of a "MortalityLaw" fit, the number of fitted ages minus the number of estimated parameters.

Usage

# S3 method for class 'MortalityLaw'
df.residual(object, ...)

Arguments

object

An object of class "MortalityLaw".

...

Further arguments passed to or from other methods.

Value

The residual degrees of freedom for a single fit, or a named vector for a multiple fit.

Examples

x  <- 45:75
M1 <- MortalityLaw(x = x, Dx = ahmd$Dx[as.character(x), "1950"],
                   Ex = ahmd$Ex[as.character(x), "1950"],
                   law = "makeham", opt.method = "poissonL")
df.residual(M1)
#> df.residual 
#>          28