get.tfr.mcmc: Accessing MCMC Results

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/get_outputs.R

Description

The function get.tfr.mcmc retrieves results of an MCMC simulation of Phase II and creates an object of class bayesTFR.mcmc.set. Function has.tfr.mcmc checks the existence of such results. Functions get.tfr3.mcmc and has.tfr3.mcmc do the same for Phase III MCMCs. Function tfr.mcmc extracts a single chain and tfr.mcmc.list extracts several or all chains from the simulation results.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
get.tfr.mcmc(sim.dir = file.path(getwd(), "bayesTFR.output"), 
    chain.ids = NULL, low.memory = TRUE, burnin = 0, verbose = FALSE)

has.tfr.mcmc(sim.dir)

get.tfr3.mcmc(sim.dir = file.path(getwd(), "bayesTFR.output"), ...)

has.tfr3.mcmc(sim.dir)

tfr.mcmc(mcmc.set, chain.id)

tfr.mcmc.list(mcmc.set, chain.ids=NULL)

Arguments

sim.dir

Directory where the 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

If FALSE full MCMC traces are loaded into memory.

burnin

Burnin used for loading traces. Only relevant, if low.memory=FALSE.

verbose

Logical switching log messages on and off.

chain.id

Chain identifier.

mcmc.set

Object of class bayesTFR.mcmc.set.

...

Arguments passed to get.tfr.mcmc.

Details

Function get.tfr.mcmc is an accessor of results generated using run.tfr.mcmc and continue.tfr.mcmc. Function get.tfr3.mcmc can be used to access results generated using run.tfr3.mcmc and continue.tfr3.mcmc.

Value

get.tfr.mcmc and get.tfr3.mcmc return an object of class bayesTFR.mcmc.set. has.tfr.mcmc and has.tfr3.mcmc return a logical value. tfr.mcmc returns an object of class bayesTFR.mcmc, and tfr.mcmc.list returns a list of bayesTFR.mcmc objects.

Author(s)

Hana Sevcikova

See Also

bayesTFR.mcmc.set

Examples

1
2
3
4
5
6
sim.dir <- file.path(find.package("bayesTFR"), "ex-data", "bayesTFR.output")
m <- get.tfr.mcmc(sim.dir)
summary(m)

# summary of the single chains
for(mc in tfr.mcmc.list(m)) print(summary(mc))

jasonacollins/bayesTFR1 documentation built on May 23, 2019, 7:34 a.m.