get.mig.mcmc {bayesMig}R Documentation

Access MCMC results

Description

Function get.mig.mcmc retrieves results of an MCMC simulation and creates an object of class bayesMig.mcmc.set. Function has.mig.mcmc checks the existence of such results.

Usage

get.mig.mcmc(
  sim.dir,
  chain.ids = NULL,
  low.memory = TRUE,
  burnin = 0,
  verbose = FALSE
)

has.mig.mcmc(sim.dir)

Arguments

sim.dir

Directory where simulation results are stored.

chain.ids

Chain identifiers in case only specific chains should be included in the resulting object. By default, all available chains are included.

low.memory

Logical. If FALSE full MCMC traces are loaded into memory.

burnin

Burn-in used for loading traces. Only relevant, if low.memory=FALSE.

verbose

Logical value. Switches log messages on and off.

Value

get.mig.mcmc returns an object of class bayesMig.mcmc.set.

has.mig.mcmc returns a logical value indicating if a migration simulation exists in the given directory.

See Also

run.mig.mcmc

Examples


# Toy simulation
sim.dir <- tempfile()
m <- run.mig.mcmc(nr.chains = 1, iter = 10, output.dir = sim.dir)

# can be later accessed via
m <- get.mig.mcmc(sim.dir)
summary(m)

has.mig.mcmc(sim.dir) # should be TRUE

unlink(sim.dir, recursive = TRUE)


[Package bayesMig version 0.4-6 Index]