plot_parameters_li_lee: Plot the parameters of the multipopulation (Li-Lee) model

View source: R/plot_parameters_li_lee.R

plot_parameters_li_leeR Documentation

Plot the parameters of the multipopulation (Li-Lee) model

Description

This function plots the estimated parameters in the multipopulation Li-Lee model.

Usage

plot_parameters_li_lee(xv, yv, fit, sex, country_spec, method, type)

Arguments

xv

The vector of ages.

yv

The vector of years (for your country of interest).

fit

The estimated Li-Lee model.

sex

The gender of interest ("Male" or "Female")

country_spec

The user code of your country of interest.

method

The method used to fit the Li-Lee mortality model (currently only "NR" working).

type

Which type of parameter estimates should be visualized? Either one of the common parameter estimates ("A.x", "B.x" or "K.t"), one of the country-specific estimates ("a.x", "b.x" or "k.t") or all of them combined in one plot ("ALL")

Details

The object fit must be the output of the function fit_li_lee.

Value

A plot showing the parameter estimates of the fitted Li-Lee model.

Examples

lst   <- MultiMoMo::european_mortality_data
dat_M <- lst$M
xv    <- 0:90
yv = yvSPEC <- 1970:2018
Countries   <- names(dat_M$UNI)
country_spec <- "BE"
fit_M <- fit_li_lee(xv, yv, yvSPEC, country_spec, dat_M, "NR", TRUE, FALSE)
plot_parameters_li_lee(xv, yvSPEC, fit_M, "Male", country_spec, "NR", "k.t")


RobbenJ/MultiMoMo documentation built on June 28, 2022, 9:29 p.m.