Compute cohort-style survival from Eurostat EUROPOP2023 mortality assumptions
Source:R/life.R
chance_alive_es_aasmr.RdComputes conditional survival (chance alive) for a person aged age0 in
start_year using Eurostat EUROPOP2023 age-specific mortality rate assumptions
(dataset proj_23naasmr). The computation follows a cohort path (diagonal):
for age age0 + k it uses the mortality rate for year start_year + k.
Arguments
- es
A tibble as returned by
read_es_aasmr().- geo
Eurostat geo code (e.g.
"BG","NL").- sex
Sex code:
"m"or"f"(case-insensitive).- age0
Baseline age (integer).
- start_year
Starting calendar year (integer). If
NULL, uses the earliest year available for the selectedgeo/sex.
Examples
if (FALSE) { # \dontrun{
es <- read_es_aasmr(file.path("data", "life"))
ca <- chance_alive_es_aasmr(es, geo = "NL", sex = "m", age0 = 42, start_year = 2022)
p <- plot_chance_alive_es_aasmr(ca, sex = "m", population = "NL")
p
} # }