View source: R/plot_functions.R
e0.joint.plot | R Documentation |
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, ...)
e0.pred |
Object of class |
country |
Name or numerical code of a country. It can also be given as ISO-2 or ISO-3 characters. |
pi |
Probability interval. It can be a single number or an array. |
years |
Array of future years for which to plot the distribution. |
nr.points |
Number of points shown in the plot for each year. |
obs.pch, obs.cex |
Graphical parameters used for displaying observed data or data without variation. |
xlim, ylim, xlab, ylab, main |
Graphical parameters passed to the |
col |
Array of colors, one for each year. |
show.legend |
Logical controlling whether the legend should be drawn. |
add |
Logical controlling whether the distribution should be plotted into a new graphic device ( |
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 passed to the |
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.