mcmc_derive: MCMC Derive

Description Usage Arguments Value Methods (by class) Examples

Description

Generate an MCMC object of derived parameter(s) from an MCMC an mcmcr, mcmc.list or mcmcrs object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
mcmc_derive(object, ...)

## S3 method for class 'mcmcr'
mcmc_derive(object, expr, values = list(),
  monitor = ".*", parallel = FALSE, silent = FALSE, ...)

## S3 method for class 'mcmc.list'
mcmc_derive(object, expr, values = list(),
  monitor = ".*", parallel = FALSE, silent = FALSE, ...)

## S3 method for class 'mcmcrs'
mcmc_derive(object, expr, values = list(),
  monitor = ".*", parallel = FALSE, silent = FALSE, ...)

Arguments

object

The original MCMC object.

...

Unused.

expr

A string of the R code defining the values of the derived parameter(s) with respect to the parameters in object.

values

A named list of additional R objects to evaluate in the R expression.

monitor

A regular expression specifying the derived parameter(s) in expr to monitor.

parallel

A flag specifying whether to generate the derived parameters for each chain in parallel.

silent

A flag specifying whether to suppress messages and warnings.

Value

An MCMC object of the derived parameter(s).

Methods (by class)

Examples

1
2
3
4
5
6
7
mcmcr::mcmcr_example

expr <- "
 log(alpha2) <- alpha
 gamma <- sum(alpha) * sigma"

mcmc_derive(mcmcr::mcmcr_example, expr, silent = TRUE)

mcmcderive documentation built on July 2, 2019, 5:03 p.m.