View source: R/calc_gompertz.R
calc_gompertz_parameters | R Documentation |
Calculating Gompertz model parameters
calc_gompertz_parameters(
mortality_rates,
current_age,
estimate_max_age = FALSE
)
mortality_rates |
A data frame
with columns |
current_age |
A numeric. Current age. |
estimate_max_age |
A logical. Should the maximum age be estimated? |
A list containing:
data |
The input mortality rates data frame with additional columns like 'survival_rate' and 'probability_of_death' |
mode |
The mode of the Gompertz distribution |
dispersion |
The dispersion parameter of the Gompertz distribution |
current_age |
The current age parameter |
max_age |
The maximum age parameter |
Blanchet, David M., and Paul D. Kaplan. 2013. "Alpha, Beta, and Now... Gamma." Journal of Retirement 1 (2): 29-45. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3905/jor.2013.1.2.029")}.
mortality_rates <-
dplyr::filter(
life_tables,
country == "USA" &
sex == "male" &
year == 2022
)
calc_gompertz_parameters(
mortality_rates = mortality_rates,
current_age = 65
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.