The functions plot the joint posterior distribution of female and male life expectancy, modeled and predicted using the joint model described in Lalic (2011) and Raftery, Lalic & Gerland (2014). This can be done for one country (e0.joint.plot
) or for all countries (e0.joint.plot.all
).
e0.joint.plot(e0.pred, country, pi = 95, years, nr.points = 500,
obs.pch = 17, obs.cex=1, xlim = NULL,
ylim = NULL, xlab = "Female life expectancy", ylab = "Male life expectancy",
main = NULL, col = NULL, show.legend = TRUE, add = FALSE, ...)
e0.joint.plot.all(e0.pred, output.dir = file.path(getwd(), "e0joint"),
output.type = "png", verbose = FALSE, ...)
Object of class bayesLife.prediction
containing female projections.
Name or numerical code of a country. It can also be given as ISO-2 or ISO-3 characters.
Probability interval. It can be a single number or an array.
Array of future years for which to plot the distribution.
Number of points shown in the plot for each year.
Graphical parameters used for displaying observed data or data without variation.
Graphical parameters passed to the plot
function.
Array of colors, one for each year.
Logical controlling whether the legend should be drawn.
Logical controlling whether the distribution should be plotted into a new graphic device (FALSE
) or into an existing device (TRUE
).
Directory into which resulting graphs are stored.
Type of the resulting files. It can be “png”, “pdf”, “jpeg”, “bmp”, “tiff”, or “postscript”.
Logical switching log messages on and off.
Additional graphical parameters passed to the lines
function drawing ellipses. In addition, for e0.joint.plot.all
, ...
contains any of the arguments of e0.joint.plot
.
Hana Sevcikova, Adrian Raftery
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.
e0.gap.plot
, e0.trajectories.plot
, e0.jmale.predict
# See example for e0.jmale.predict
Run the code above in your browser using DataLab