e0.jmale.estimate {bayesLife} | R Documentation |
Estimation of the Joint Female-Male Model
Description
The function estimates the joint female-male model of life expectancy, as described in Raftery et al. (2014, 2012) and Lalic (2011). It consist of two equations with t-distributed errors, see Details below.
Usage
e0.jmale.estimate(mcmc.set, countries.index = NULL,
estDof.eq1 = TRUE, start.eq1 = list(dof = 2), max.e0.eq1 = 83,
estDof.eq2 = TRUE, start.eq2 = list(dof = 2),
constant.gap.eq2 = TRUE, include.suppl.gap = FALSE,
my.e0.file = NULL, my.locations.file = NULL,
verbose = FALSE)
Arguments
mcmc.set |
Object of class |
countries.index |
Index of countries (within the mcmc.set object) to be included in the estimation. By default, all countries included in the estimation of |
estDof.eq1 , estDof.eq2 |
Logical, controlling whether the degrees of freedom of the first and second equation, respectively, should be estimated. If it is |
start.eq1 , start.eq2 |
Argument |
max.e0.eq1 |
Maximum female life expectancy of records included in the estimation of the first equation (parameter |
constant.gap.eq2 |
Logical. If |
include.suppl.gap |
If |
my.e0.file |
File name containing user-specified male time series for one or more countries. The function replaces the corresponding country data from the WPP dataset by values in this file. Only columns are replaced that match column names of the WPP dataset. |
my.locations.file |
File name containing user-specified locations if different from the default |
verbose |
Logical switching log messages on and off. If |
Details
The joint female-male life expectancy model is a model for estimating gaps between female and male life expectancy. It consists of two parts, see Equation (1) in Raftery et al. (2012):
1. If , then
where is iid
.
2. If , then
where is iid
.
Here, is the time and
is the country index.
is the gap for country
at time
and
is the female life expectancy for country
at time
.
can be set in the
max.e0.eq1
argument.
Using the tlm
function of the hett package, the function estimates the coefficients (
) and
, as well as paramteres
(
) and optionally the degrees of freedom
(
). If
constant.gap.eq2
is TRUE
, is set to 1 and
is iid
.
The mcmc.set
object should be a bayesLife.mcmc.set
object obtained from a simulation of a female life expectancy. Note that since only the observed data and no MCMC results are used in this estimation, the mcmc.set
object can be obtained from a toy simulation such as in the example below. The function extracts observed data from this object and treats them as . For the male historical time series, the function takes the male WPP dataset (
e0M
) from the same wpp package as the female data, and possibly partly replaces the male dataset by any user-specified data given in my.e0.file
.
Value
List with the components, eq1
and eq2
, each containing estimation results from the first and second equation, respectively. These are:
coefficients |
Estimated coefficients |
sigma |
Parameter |
dof |
Degrees of freedom |
Author(s)
Hana Sevcikova
References
A. E. Raftery, N. Lalic, P. Gerland (2014). Joint Probabilistic Projection of Female and Male Life Expectancy. Demographic Research, 30:795-822.
A. E. Raftery, N. Li, H. Sevcikova , P. Gerland, G. K. Heilig (2012). Bayesian probabilistic population projections for all countries. Proceedings of the National Academy of Sciences 109:13915-13921.
Lalic, N. (2011). Master's thesis at the Department of Statistics, University of Washington.
See Also
Examples
## Not run:
sim.dir <- file.path(find.package("bayesLife"), "ex-data", "bayesLife.output")
m <- get.e0.mcmc(sim.dir)
fit <- e0.jmale.estimate(m, verbose = TRUE)
## End(Not run)