modalAge: Modal age at death of a life table

View source: R/9_demographicExtras.R

modalAgeR Documentation

Modal age at death of a life table

Description

Returns the age at which the number of deaths d_x is largest, i.e. the Lexis modal age at death. (R's base mode returns the storage type of an object and cannot be used for this, so a dedicated function is provided.)

Usage

modalAge(object, startAge = NULL, interpolate = FALSE)

Arguments

object

A lifetable or actuarialtable object.

startAge

Optional lower age bound for the search. Use it (e.g. startAge = 10) to obtain the adult modal age at death, ignoring the infant-mortality peak.

interpolate

Logical. If TRUE, a continuous estimate is returned by fitting a parabola through the d_x values at the modal age and its two neighbours (requires unit age spacing and an interior mode). Default FALSE (the integer age of maximum d_x).

Details

The death counts are d_x = l_x - l_{x+1}; the artificial mass at the last, open age interval (all remaining survivors) is excluded from the search.

Value

The modal age at death (a numeric value).

See Also

median, quantile

Examples

data(soa08Act)
modalAge(soa08Act)
modalAge(soa08Act, startAge = 10, interpolate = TRUE)

lifecontingencies documentation built on Oct. 10, 2026, 9:06 a.m.