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 |
byParameter |
|
byMCMC |
|
metrics |
character vector of metric names to add. See
|
options |
named list of options. When calling a metric
function (e.g. |
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.