Title: | Hybrid Mortality Estimation |
---|---|
Description: | Hybrid Mortality Modelling (HMM) provides a framework in which mortality around "the accident hump" and at very old ages can be modelled under a single model. The graphics' codes necessary for visualization of the models' output are included here. Specifically, the graphics are based on the assumption that, the mortality rates can be expressed as a function of the area under the curve between the crude mortality rates plots and the tangential transform of the force of mortality. |
Authors: | Titus K Rotich <[email protected]> |
Maintainer: | Titus K Rotich <[email protected]> |
License: | GPL-3 |
Version: | 1.3 |
Built: | 2024-12-18 06:44:15 UTC |
Source: | CRAN |
Produces a plot of the area-under-the-curve for the mortality data, but lplot() inverted
iplot(n, x, add = F)
iplot(n, x, add = F)
n |
the length of the vector Defaults to TRUE. |
x |
the vector arguement. |
add |
whether to add lines. Default is FALSE |
m1 <- Mortality$D.Male[which(Mortality$Year == 2008)] m2 <- Mortality$E.Male[which(Mortality$Year == 2008)] male.1 <- m1/m2 male.2 <- log(male.1[!is.na(male.1)]) iplot(1:length(male.2),male.2) iplot(1:length(male.2),male.2,add=TRUE)
m1 <- Mortality$D.Male[which(Mortality$Year == 2008)] m2 <- Mortality$E.Male[which(Mortality$Year == 2008)] male.1 <- m1/m2 male.2 <- log(male.1[!is.na(male.1)]) iplot(1:length(male.2),male.2) iplot(1:length(male.2),male.2,add=TRUE)
Produces a plot of the area-under-the-curve for the mortality data
lplot(n, x, add = F)
lplot(n, x, add = F)
n |
the length of the vector Defaults to TRUE. |
x |
the vector arguement. |
add |
whether to add lines. Default is FALSE |
m1 <- Mortality$D.Male[which(Mortality$Year == 2008)] m2 <- Mortality$E.Male[which(Mortality$Year == 2008)] male.1 <- m1/m2 male.2 <- log(male.1[!is.na(male.1)]) lplot(1:length(male.2),male.2) lplot(1:length(male.2),male.2,add=TRUE)
m1 <- Mortality$D.Male[which(Mortality$Year == 2008)] m2 <- Mortality$E.Male[which(Mortality$Year == 2008)] male.1 <- m1/m2 male.2 <- log(male.1[!is.na(male.1)]) lplot(1:length(male.2),male.2) lplot(1:length(male.2),male.2,add=TRUE)
Produces a plot of the difference between the area-under-the-curve for the mortality data and the extended mortality boundaries
mmplot(n, x, young, old)
mmplot(n, x, young, old)
n |
the length of the vector Defaults to TRUE. |
x |
the vector arguement. |
young |
the age at which the accident hump begins. Must be entered |
old |
age at which, either mortality experience between males and females converge, or rapid acceleration of mortality. This is typically over 80 years. |
#Examples m1 <- Mortality$D.Male[which(Mortality$Year == 2008)] m2 <- Mortality$E.Male[which(Mortality$Year == 2008)] male.1 <- m1/m2 male.2 <- log(male.1[!is.na(male.1)]) lplot(1:length(male.2),male.2) mmplot(1:length(male.2),male.2,young=17,old=80)
#Examples m1 <- Mortality$D.Male[which(Mortality$Year == 2008)] m2 <- Mortality$E.Male[which(Mortality$Year == 2008)] male.1 <- m1/m2 male.2 <- log(male.1[!is.na(male.1)]) lplot(1:length(male.2),male.2) mmplot(1:length(male.2),male.2,young=17,old=80)
Exposed to Risk and number of deaths data.
Mortality
Mortality
A data frame with 6 columns corresponding to:
Corresponding year of data collected
Age of the individual
Male Exposed-to-Risk Population
Female Exposed-to-Risk Population
Number of male death counts, for the given year and age
Number of female death counts, for the given year and age
Mortality data for both Males and Females in Switzerland, from 1981 to 2014.
These data are freely available at the Human Mortality Database
http://www.mortality.org/cgi-bin/hmd/country.php?cntr=CHE&level=1
Glei, D. and Andreeva, M. (2016). About mortality data for switzerland.
Produces a plot of a copula, which can be used to assess the dependency between two sexes bounded by the actual and the expanded mortality estimates
pccopula(theta, pl = 1, z)
pccopula(theta, pl = 1, z)
theta |
gives the order. |
pl |
gives the association. |
z |
the length of the z axis Defaults to 10. |
#Examples pccopula(theta=3,pl=.5,z=10)
#Examples pccopula(theta=3,pl=.5,z=10)
Similar to pccopula(), but suitable when the dependence is stronger at the older ages
pgcopula(theta, pl = 1, z)
pgcopula(theta, pl = 1, z)
theta |
gives the order. |
pl |
gives the association, with a correction for the direction of dependence |
z |
the length of the z axis Defaults to 10. |
#Examples pgcopula(theta=1.3,pl=2,z=10)
#Examples pgcopula(theta=1.3,pl=2,z=10)
Produces a similar plot as lplot(), only a transposition of ages is made
vplot(n, x, add = F)
vplot(n, x, add = F)
n |
the length of the vector Defaults to TRUE. |
x |
the vector arguement. |
add |
whether to add lines. Default is FALSE |
m1 <- Mortality$D.Male[which(Mortality$Year == 2008)] m2 <- Mortality$E.Male[which(Mortality$Year == 2008)] male.1 <- m1/m2 male.2 <- log(male.1[!is.na(male.1)]) vplot(1:length(male.2),male.2)
m1 <- Mortality$D.Male[which(Mortality$Year == 2008)] m2 <- Mortality$E.Male[which(Mortality$Year == 2008)] male.1 <- m1/m2 male.2 <- log(male.1[!is.na(male.1)]) vplot(1:length(male.2),male.2)