modifyMetrics {compareMCMCs}R Documentation

Manipulate metrics in one or more MCMCresult object(s)

Description

Clear metrics or add metrics to MCMC results.

Usage

clearMetrics(results, byParameter = TRUE, byMCMC = TRUE)

addMetrics(
  results,
  metrics = c("mean", "median", "sd", "CI95_low", "CI95_upp", "ESS", "efficiency"),
  options = list()
)

Arguments

results

an MCMCresult object or list of MCMCresult objects.

byParameter

TRUE or FALSE: whether to clear byParameter metrics

byMCMC

TRUE or FALSE: whether to clear byMCMC metrics

metrics

character vector of metric names to add. See metrics.

options

named list of options. When calling a metric function (e.g. mean), if there is a named element with that name (e.g. "mean"), it will be passed as the second argument to the metric function.

Details

These functions provide ways to manipulate the collection of metrics inside one or more MCMCresult objects.

The MCMCresult class is fairly simple. One can also modify contents of an MCMCresult object using class methods or direct manipulation of contents.

Metrics are organized as "byParameter", when there is one result for each parameter (column) of MCMC output, and "byMCMC", when there is one result for an entire MCMC sample (across all parameters).

clearMetrics clears all metrics by parameter, by MCMC, or both.

addMetrics populates a set of metrics. See package vignette for more information.

See Also

combineMetrics


[Package compareMCMCs version 0.5.0 Index]