View source: R/plot_functions.R
e0.gap.plot | R Documentation |
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
).
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, ...)
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. |
e0.pred2 |
Object of class |
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 |
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 |
Hana Sevcikova
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.joint.plot
, e0.jmale.estimate
, e0.jmale.predict
, get.e0.jmale.prediction
# See example for e0.jmale.predict
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.