Skip to contents

Returns the dispersion of the fit, a scalar measure of how far the fitted values spread around the data. For the count cases it is the Pearson chi-square divided by the residual degrees of freedom, the GLM dispersion (about 1 for a correctly specified Poisson model); for the rate cases it is the mean squared log-residual. The value is also reported by summary.MortalityLaw.

Usage

dispersion(object, ...)

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

Arguments

object

An object of class "MortalityLaw".

...

Further arguments passed to or from other methods.

Value

The dispersion for a single fit, or a named vector of dispersions 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")
dispersion(M1)
#> [1] 3.869687