Extract the Residual Degrees of Freedom of a Fitted Mortality Law
Source:R/MortalityLaw_S3.R
df.residual.MortalityLaw.RdReturns 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, ...)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