get.mig.convergence {bayesMig}R Documentation

Accessing Convergence Diagnostics Object

Description

The function retrieves results of convergence diagnostics (created by mig.diagnose) from disk.

Usage

get.mig.convergence(sim.dir, thin = 225, burnin = 10000)

get.mig.convergence.all(sim.dir)

Arguments

sim.dir

Simulation directory used for computing the diagnostics.

thin

Thinning interval used with this diagnostics.

burnin

Burn-in used for computing the diagnostics.

Details

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.

Value

get.mig.convergence returns an object of class bayesMig.convergence;
get.mig.convergence.all returns a list of objects of class bayesMig.convergence.

See Also

mig.diagnose, summary.bayesMig.convergence

Examples


# 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)


[Package bayesMig version 0.4-6 Index]