View source: R/calc_gompertz.R
plot_gompertz_calibration | R Documentation |
Plotting the results of Gompertz model calibration
plot_gompertz_calibration(params, mode, dispersion, max_age)
params |
A list returned by |
mode |
A numeric. The mode of the Gompertz model. |
dispersion |
A numeric. The dispersion of the Gompertz model. |
max_age |
A numeric. The maximum age of the Gompertz model. |
A ggplot2::ggplot()
object showing the comparison between
actual survival rates from life tables and the fitted Gompertz model.
mortality_rates <-
dplyr::filter(
life_tables,
country == "USA" &
sex == "female" &
year == 2022
)
params <- calc_gompertz_parameters(
mortality_rates = mortality_rates,
current_age = 65
)
plot_gompertz_calibration(params = params)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.