e0.gap.plot: Posterior Distribution of Gaps in Female and Male Life...

Description Usage Arguments Author(s) References See Also Examples

View source: R/plot_functions.R

Description

The functions plot the posterior distribution of the gaps between female and male life expectancy, modeled and predicted using a model described in Lalic (2011) and Raftery, Lalic & Gerland (2014). This can be done for one country (e0.gap.plot) or for all countries (e0.gap.plot.all).

Usage

1
2
3
4
5
6
7
e0.gap.plot(e0.pred, country, e0.pred2 = NULL, pi = c(80, 95), 
    nr.traj = 0, xlim = NULL, ylim = NULL, type = "b", 
    xlab = "Year", ylab = "Gap in life expectancy", main = NULL, 
    show.legend = TRUE, ...)
    
e0.gap.plot.all(e0.pred, output.dir = file.path(getwd(), "e0gaps"),
    output.type = "png", verbose = FALSE, ...)

Arguments

e0.pred

Object of class bayesLife.prediction containing female projections. If e0.pred2 is not given, then this object must contain the ‘joint.male’ component, generated using the e0.jmale.predict function.

country

Name or numerical code of a country.

e0.pred2

Object of class bayesLife.prediction containing male projections. By default the male projections is taken from the joint female-male projections in e0.pred, see above.

pi

Probability interval. It can be a single number or an array.

nr.traj

Number of trajectories to be plotted.

xlim, ylim, type, xlab, ylab, main

Graphical parameters passed to the plot function.

show.legend

Logical controlling whether the legend should be drawn.

output.dir

Directory into which resulting graphs are stored.

output.type

Type of the resulting files. It can be “png”, “pdf”, “jpeg”, “bmp”, “tiff”, or “postscript”.

verbose

Logical switching log messages on and off.

...

Additional graphical parameters. In addition, for e0.gap.plot.all, ... contains any of the arguments of e0.gap.plot.

Author(s)

Hana Sevcikova

References

Lalic, N. (2011). Master's thesis at the Department of Statistics, University of Washington.

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

See Also

e0.joint.plot, e0.jmale.estimate, e0.jmale.predict, get.e0.jmale.prediction

Examples

1
# See example for e0.jmale.predict

bayesLife documentation built on Oct. 30, 2019, 12:03 p.m.