View source: R/plot_functions.R
e0.pardensity.plot | R Documentation |
Functions for plotting density of the posterior distribution of the MCMC parameters.
e0.pardensity.plot(mcmc.list = NULL,
sim.dir = file.path(getwd(), "bayesLife.output"),
chain.ids = NULL, par.names = NULL,
burnin = NULL, dev.ncol = 5, low.memory = TRUE, ...)
e0.pardensity.cs.plot(country, mcmc.list = NULL,
sim.dir = file.path(getwd(), "bayesLife.output"),
chain.ids = NULL, par.names = NULL,
burnin = NULL, dev.ncol = 3, low.memory = TRUE, ...)
country |
Name or numerical code of a country. |
mcmc.list |
List of |
sim.dir |
Directory with the MCMC simulation results. It is only used if |
chain.ids |
List of MCMC identifiers to be plotted. If it is |
par.names |
Names of parameters for which density should be plotted. By default all country-independent parameters are plotted if used within |
burnin |
Number of iterations to be discarded from the beginning of each chain. |
dev.ncol |
Number of columns for the graphics device. If the number of parameters is smaller than |
low.memory |
Logical indicating if the processing should run in a memory-efficient mode. |
... |
Further arguments passed to the |
The functions plot the density of the posterior distribution either for country-independent parameters (e0.pardensity.plot
) or for country-specific parameters (e0.pardensity.cs.plot
), one graph per parameter. One can restrict it to specific chains by setting the chain.ids
argument and to specific parameters by setting the par.names
argument.
If mcmc.list
is an object of class bayesLife.prediction
, thinned traces are used instead of the full chains. In such a case, burnin
and chain.ids
cannot be modified - their value is set to the one used when the thinned traces were created, namely when running e0.predict
.
Hana Sevcikova
e0.partraces.plot
sim.dir <- file.path(find.package("bayesLife"), "ex-data", "bayesLife.output")
e0.pardensity.plot(sim.dir = sim.dir, burnin = 10)
e0.pardensity.cs.plot(country = "Ireland", sim.dir = sim.dir, burnin = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.