bayesLife-package {bayesLife}R Documentation

Bayesian Projection of the Life Expectancy

Description

Collection of functions for making probabilistic projections of the life expectancy for all countries of the world, using a Bayesian hierarchical model and the United Nations demographic time series. Projections on a subnational level are also supported.

Details

The projection follows a method developed by Chunn et al (2010, 2013). It uses historical data provided by the United Nations to simulate a posterior distribution of the life expectancy for all countries in the world simultaneously.

The package is implemented in a similar way as the bayesTFR package and thus, many functions have their equivalents in bayesTFR. The main functions of the bayesLife package are:

A number of functions analyzing results are included in the package:

For MCMC diagnostics, function e0.coda.list.mcmc creates an object of type “mcmc.list” that can be used with the coda package. Furthermore, function e0.diagnose analyzes the MCMCs using the Raftery diagnostics implemented in the coda package and gives information about parameters that did not converge. Function e0.dl.coverage computes a goodness of fit of the double logistic function.

Existing simulation results can be accessed using the get.e0.mcmc function. An existing prediction can be accessed via get.e0.prediction. Existing predictions on a subnational level can be accessed via get.rege0.prediction

Historical data are taken from one of the packages wpp2019 (default), wpp2017, wpp2015, wpp2012 or wpp2010, depending on users settings.

Note

There is a directory ex-data shipped with the package which contains results from an example simulation, containing one chain with 60 iterations. The Example section below shows how these results were created. These data are used in Example sections throughout the manual. The user can either reproduce the data in her/his local directory, or use the ones from the package.

Author(s)

Hana Sevcikova, Adrian Raftery, Jennifer Chunn

Maintainer: Hana Sevcikova <hanas@uw.edu>

References

J. L. Chunn, A. E. Raftery, P. Gerland, H. Sevcikova (2013): Bayesian Probabilistic Projections of Life Expectancy for All Countries. Demography 50(3):777-801. <doi:10.1007/s13524-012-0193-x>

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.

A. E. Raftery, N. Lalic, P. Gerland (2014). Joint Probabilistic Projection of Female and Male Life Expectancy. Demographic Research, 30:795-822.

H. Sevcikova, A. E. Raftery (2021). Probabilistic Projection of Subnational Life Expectancy. Journal of Official Statistics, in press.

See Also

bayesTFR

Examples

## Not run: 
sim.dir <- tempfile()
m <- run.e0.mcmc(sex = 'F', nr.chains = 1, iter = 60, seed = 1, 
        thin = 1, output.dir = sim.dir, verbose = TRUE)
pred <- e0.predict(m, burnin = 30, verbose = TRUE)
summary(pred, country = "Canada")
unlink(sim.dir, recursive = TRUE)
## End(Not run)

[Package bayesLife version 5.0-1 Index]