overture (version 0.4-0)

LoadMcmc: Load samples from a file-backed MCMC run

Description

LoadMcmc loads the samples from a file-backed MCMC run initiated by InitMcmc. The result is a list of big.matrix with all of the parameters that were saved in the MCMC run. Alternatively, the samples for individual parameters can be loaded by using attach.big.matrix to load the corresponding descriptor file, "ParameterName.desc," in the MCMC's backing.path directory.

Usage

LoadMcmc(backing.path)

Arguments

backing.path

directory path where MCMC samples were saved

Value

list of big.matrix with the MCMC samples

See Also

ToMemory, Peek, attach.big.matrix

Examples

Run this code
# NOT RUN {
# Run a file-backed MCMC
backing.path <- tempfile()
dir.create(backing.path)
Mcmc <- InitMcmc(1000, backing.path=backing.path)
samples <- Mcmc({
    x <- rnorm(1)
})
rm(samples)

# Load the saved samples
loaded.samples <- LoadMcmc(backing.path)
hist(loaded.samples$x[,], main="Samples", xlab="x")
# }

Run the code above in your browser using DataLab