LoadMcmc {overture} | R Documentation |
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.
LoadMcmc(backing.path)
backing.path |
directory path where MCMC samples were saved |
list of big.matrix
with the MCMC samples
ToMemory
, Peek
,
attach.big.matrix
# 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")