get.total.iterations {bayesTFR} | R Documentation |
Total Number of Iterations
Description
Function get.total.iterations
gives the total number of iterations of MCMCs summed over chains whith burnin being subtracted from each chain. Function get.stored.mcmc.length
gives the total length of the MCMCs stored on disk minus those iterations that correspond to burnin. Result of the latter will be different from the former only if the MCMCs were run with value of thin
larger than one.
Usage
get.total.iterations(mcmc.list, burnin = 0)
get.stored.mcmc.length(mcmc.list, burnin = 0)
Arguments
mcmc.list |
List of |
burnin |
Number of iterations to be subtracted from each chain. |
Value
A single number.
Author(s)
Hana Sevcikova
See Also
Examples
sim.dir <- file.path(find.package("bayesTFR"), "ex-data", "bayesTFR.output")
mcmc.set <- get.tfr.mcmc(sim.dir=sim.dir)
get.total.iterations(mcmc.set$mcmc.list) # 60=1chain x 60iters
get.total.iterations(mcmc.set$mcmc.list, burnin=20) # 40=1x(60-20)
## Not run:
sim.dir <- tempfile()
m <- run.tfr.mcmc(iter=10, nr.chains=2, output.dir=sim.dir, thin=5, verbose=TRUE)
get.total.iterations(m$mcmc.list) # 20=2x10
get.stored.mcmc.length(m$mcmc.list) # 6=2x3
unlink(sim.dir, recursive=TRUE)
## End(Not run)
[Package bayesTFR version 7.4-2 Index]