stan2mcmc: Convert a Stanfit object to MCMC object

Description Usage Arguments Details Value Author(s) Examples

View source: R/stan2mcmc.R

Description

Converts a stanfit object into a MCMC object for easier analysis.

Usage

1
stan2mcmc(stanFit)

Arguments

stanFit

A stanfit object from the output of either fecr_stan() or fec_stan()

Details

The output can be analyzed as a typical MCMC object with the functions from the coda package. NOTE: The resulting MCMC object does not contain warm-up samples and is already thinned.

Value

A MCMC object with a list of relevant parameters.

Author(s)

Craig Wang

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
data(epgs)

## apply zero-infation model for the paired design 
model <- fecr_stan(epgs$before, epgs$after, rawCounts = FALSE, 
                   preCF = 10, paired = TRUE, zeroInflation = TRUE)
samples <- stan2mcmc(model$stan.samples)
summary(samples)

## End(Not run)

eggCounts documentation built on May 2, 2018, 5:06 p.m.