<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Conversion to coda-formatted objects</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="https://rpkg.net/assets/examples.css" />
</head><body>

<table width="100%" summary="page for mig.coda.list.mcmc"><tr><td>mig.coda.list.mcmc</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>Conversion to coda-formatted objects</h2>

<h3>Description</h3>

<p>The functions convert MCMC traces (simulated using <code>run.mig.mcmc</code>) into 
objects that can be used with the <span class="pkg">coda</span> package.
</p>


<h3>Usage</h3>

<pre>
mig.coda.list.mcmc(
  mcmc.list = NULL,
  country = NULL,
  chain.ids = NULL,
  sim.dir = NULL,
  par.names = NULL,
  par.names.cs = NULL,
  low.memory = FALSE,
  ...
)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>mcmc.list</code></td>
<td>
<p>A list of objects of class <code>bayesMig.mcmc</code>, or an object of class <code>bayesMig.mcmc.set</code> or <code>bayesMig.prediction</code>.
If <code>NULL</code>, the MCMCs are
loaded from <code>sim.dir</code>. Either <code>mcmc</code> or <code>sim.dir</code> must be given.</p>
</td></tr>
<tr valign="top"><td><code>country</code></td>
<td>
<p>Location name or code. Used in connection with the <code>par.names.cs</code> argument
(see below).</p>
</td></tr>
<tr valign="top"><td><code>chain.ids</code></td>
<td>
<p>Vector of chain identifiers. By default, all chains available in the <code>mcmc.list</code>
object are included.</p>
</td></tr>
<tr valign="top"><td><code>sim.dir</code></td>
<td>
<p>Directory with the MCMC simulation results. Only used if <code>mcmc.list</code> is <code>NULL</code>.</p>
</td></tr>
<tr valign="top"><td><code>par.names</code></td>
<td>
<p>Names of country-independent parameters to be included. Default names are
those returned by the <code>mig.parameter.names</code> function, which includes all country-independent
parameters in the BHM.</p>
</td></tr>
<tr valign="top"><td><code>par.names.cs</code></td>
<td>
<p>Names of country-specific parameters to be included. The argument <code>country</code>
is used to filter out traces that correspond to a specific location. If <code>country</code> is not given, 
traces of each parameter are given for all countries. Default names are those returned by 
<code>mig.parameter.names.cs()</code>, which includes all country-specific parameters in the BHM.</p>
</td></tr>
<tr valign="top"><td><code>low.memory</code></td>
<td>
<p>Logical indicating if the function should run in a memory-efficient mode.</p>
</td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
<p>Additional arguments passed to the <span class="pkg">coda</span>'s <code>mcmc</code> function, such as <code>burnin</code> and <code>thin</code>.</p>
</td></tr>
</table>


<h3>Value</h3>

<p>Returns an object of class <code>mcmc.list</code> defined in the <span class="pkg">coda</span> package.
</p>


</body></html>