Description Usage Arguments Details Author(s) Examples
The functions plot the posterior distribution of the double logistic function used in the simulation of Phase II, including their median and given probability intervals.
1 2 3 4 5 6 7 8 | DLcurve.plot(mcmc.list, country, burnin = NULL, pi = 80, tfr.max = 10,
nr.curves = NULL, predictive.distr = FALSE, ylim = NULL,
xlab = 'TFR (reversed)', ylab = 'TFR decrement', main = NULL,
show.legend = TRUE, col=c('black', 'red', "#00000020"), ...)
DLcurve.plot.all(mcmc.list = NULL, sim.dir = NULL,
output.dir = file.path(getwd(), 'DLcurves'),
output.type = "png", burnin = NULL, verbose = FALSE, ...)
|
mcmc.list |
List of |
country |
Name or numerical code of a country. |
burnin |
Number of iterations to be discarded from the beginning of parameter traces. |
pi |
Probability interval. It can be a single number or an array. |
tfr.max |
Maximum TFR to be shown in the plot. |
nr.curves |
Number of curves to be plotted. If |
predictive.distr |
Logical. If |
ylim, xlab, ylab, main |
Graphical parameters passed to the |
show.legend |
Logical determining if the legend should be shown. |
col |
Vector of colors in this order: 1. observed data points, 2. quantiles, 3. trajectories |
... |
Additional graphical parameters. For |
sim.dir |
Directory with the simulation results. Only relevant, if |
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. |
DLcurve.plot
plots double logistic curves for the given country. DLcurve.plot.all
creates such plots for all countries and stores them in output.dir
. Parameters inputting the double logistic function are either thinned traces created by the tfr.predict
function (if mcmc.list
is an object of class bayesTFR.prediction
), or they are selected by equal spacing from the MCMC traces. In the former case, burnin
is set automatically; in the latter case, burnin
defaults to 0. If nr.curves
is smaller than 2000, the median and probability intervals are computed on a sample of 2000 equally spaced data points, otherwise on all plotted curves.
Hana Sevcikova, Leontine Alkema
1 2 3 4 5 6 | ## Not run:
sim.dir <- file.path(find.package("bayesTFR"), "ex-data", "bayesTFR.output")
mcmc.set <- get.tfr.mcmc(sim.dir=sim.dir)
DLcurve.plot(country="Burkina Faso", mcmc.set, burnin=15)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.