get.mig.convergence | R Documentation |
The function retrieves results of convergence diagnostics
(created by mig.diagnose
) from disk.
get.mig.convergence(sim.dir, thin = 225, burnin = 10000)
get.mig.convergence.all(sim.dir)
sim.dir |
Simulation directory used for computing the diagnostics. |
thin |
Thinning interval used with this diagnostics. |
burnin |
Burn-in used for computing the diagnostics. |
Function get.mig.convergence
loads an object of class
bayesMig.convergence
for the specific thin
and burnin
used in mig.diagnose
to generate this object.
Function get.mig.convergence.all
loads all bayesMig.convergence
objects
available in sim.dir
.
get.mig.convergence
returns an object of class bayesMig.convergence
;
get.mig.convergence.all
returns a list of objects of class bayesMig.convergence
.
mig.diagnose
, summary.bayesMig.convergence
# Run a real simulation (can take long time)
sim.dir <- tempfile()
m <- run.mig.mcmc(nr.chains = 2, iter = 10000, thin = 10, output.dir = sim.dir)
# Run convergence diagnostics with different burning and thin
mig.diagnose(sim.dir, burnin = 1000, thin = 2)
mig.diagnose(sim.dir, burnin = 500, thin = 1)
diags <- get.mig.convergence.all(sim.dir)
for(i in 1:length(diags))
print(summary(diags[[i]]))
unlink(sim.dir, recursive = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.