View source: R/9_demographicExtras.R
| modalAge | R Documentation |
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.)
modalAge(object, startAge = NULL, interpolate = FALSE)
object |
A |
startAge |
Optional lower age bound for the search. Use it (e.g.
|
interpolate |
Logical. If |
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.
The modal age at death (a numeric value).
median, quantile
data(soa08Act)
modalAge(soa08Act)
modalAge(soa08Act, startAge = 10, interpolate = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.