Learn R Programming

bayesLife (version 5.2-0)

e0.partraces.plot: Plotting MCMC Parameter Traces

Description

Functions for plotting the MCMC parameter traces.

Usage

e0.partraces.plot(mcmc.list = NULL, 
    sim.dir = file.path(getwd(), "bayesLife.output"), 
    chain.ids = NULL, par.names = NULL, 
    nr.points = NULL, dev.ncol = 5, low.memory = TRUE, ...)
    
e0.partraces.cs.plot(country, mcmc.list = NULL, 
    sim.dir = file.path(getwd(), "bayesLife.output"), 
    chain.ids = NULL, par.names = NULL, 
    nr.points = NULL, dev.ncol = 3, low.memory = TRUE, ...)

Arguments

country

Name or numerical code of a country. It can also be given as ISO-2 or ISO-3 characters.

mcmc.list

List of bayesLife.mcmc objects, or an object of class bayesLife.mcmc.set or of class bayesLife.prediction. If it is NULL, the traces are loaded from sim.dir.

sim.dir

Directory with the MCMC simulation results. It is only used if mcmc.list is NULL.

chain.ids

List of MCMC identifiers to be plotted. If it is NULL, all chains found in mcmc.list or sim.dir are plotted.

par.names

Names of parameters for which traces should be plotted. By default all country-independent parameters are plotted if used within e0.partraces.plot, or country-specific parameters are plotted if used within e0.partraces.cs.plot.

nr.points

Number of points to be plotted. If NULL, all (stored) points are plotted, otherwise the traces are thinned evenly.

dev.ncol

Number of column for the graphics device. If the number of parameters is smaller than dev.ncol, the number of columns is automatically decreased.

low.memory

Logical indicating if the processing should run in a low-memory mode. If it is FALSE, traces of all available parameters are loaded into memory. Otherwise, parameters are loaded as they are needed and are not kept in the memory.

...

Additional graphical arguments. It can also contain the arguments burnin or thin.

Author

Hana Sevcikova

Details

The functions plot MCMC traces either for country-independent parameters (e0.partraces.plot) or for country-specific parameters (e0.partraces.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.

See Also

e0.coda.list.mcmc and get.e0.parameter.traces for retrieving the raw values of traces.

Examples

Run this code
sim.dir <- file.path(find.package("bayesLife"), "ex-data", "bayesLife.output")
e0.partraces.plot(sim.dir = sim.dir)
e0.partraces.cs.plot(country = "IRL", sim.dir = sim.dir)

Run the code above in your browser using DataLab