Functions for plotting the density of the posterior distribution of the MCMC parameters from the migration model.
mig.pardensity.plot(
mcmc.list = NULL,
sim.dir = NULL,
chain.ids = NULL,
par.names = mig.parameter.names(),
burnin = NULL,
dev.ncol = 2,
low.memory = TRUE,
...
)mig.pardensity.cs.plot(
country,
mcmc.list = NULL,
sim.dir = NULL,
chain.ids = NULL,
par.names = mig.parameter.names.cs(),
burnin = NULL,
dev.ncol = 3,
low.memory = TRUE,
...
)
No return value.
List of bayesMig.mcmc objects, or an object of class
bayesMig.mcmc.set or of class bayesMig.prediction. If it is NULL, the
values are loaded from sim.dir.
Directory with the MCMC simulation results. It is only used if mcmc.list is NULL.
List of MCMC identifiers to be plotted. If it is NULL, all chains found in
mcmc.list or sim.dir are plotted.
Names of parameters for which density should be plotted. By default all
country-independent parameters are plotted if used within mig.pardensity.plot, or
country-specific parameters are plotted if used within mig.pardensity.cs.plot.
Number of iterations to be discarded from the beginning of each chain before computing the density.
Number of column for the graphics device. If the number of parameters is smaller
than dev.ncol, the number of columns is automatically decreased.
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.
Further arguments passed to the density function.
Name or numerical code of a country. It can also be given as ISO-2 or ISO-3 characters.
The functions plot the density of the posterior distribution either for
country-independent parameters (mig.pardensity.plot or for country-specific
parameters (mig.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 bayesMig.prediction
and if this object contains thinned traces, they 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
mig.predict. In a situation with long MCMC chains, this approach can
significantly speed-up creation of the density plots.