tfr.partraces.plot {bayesTFR}R Documentation

Plotting MCMC Parameter Traces

Description

Functions for plotting the MCMC parameter traces.

Usage

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

Arguments

country

Name or numerical code of a country. The code can be either numeric or ISO-2 or ISO-3 characters.

mcmc.list

List of bayesTFR.mcmc objects, or an object of class bayesTFR.mcmc.set or of class bayesTFR.prediction (allowed only for Phase II MCMCs). 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 (possibly transformed) country-independent parameters are plotted if used within tfr.partraces.plot and tfr3.partraces.plot, or country-specific parameters are plotted if used within tfr.partraces.cs.plot and tfr3.partraces.cs.plot.

nr.points

Number of points to be plotted. If NULL, all 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.

Details

The functions plot MCMC traces either for country-independent parameters (tfr.partraces.plot for phase II MCMCs and tfr3.partraces.plot for phase III MCMCs) or for country-specific parameters (tfr.partraces.cs.plot for phase II MCMCs and tfr3.partraces.cs.plot for phase III MCMCs), 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.

Author(s)

Hana Sevcikova

See Also

coda.list.mcmc for retrieving raw values of the traces.

Examples

## Not run: 
sim.dir <- file.path(find.package("bayesTFR"), "ex-data", "bayesTFR.output")
tfr.partraces.plot(sim.dir=sim.dir)
tfr.partraces.cs.plot(country="Netherlands", sim.dir=sim.dir)

## End(Not run)

[Package bayesTFR version 7.4-2 Index]