metrics {compareMCMCs} | R Documentation |
MCMCresult
objectsThese functions are normally called via compareMCMCs or addMetric.
MCMCmetric_mean(result, ...)
MCMCmetric_median(result, ...)
MCMCmetric_sd(result, ...)
MCMCmetric_CI95(result, ...)
MCMCmetric_CI95low(result, ...)
MCMCmetric_CI95upp(result, ...)
MCMCmetric_ESS(result, options = NULL)
MCMCmetric_efficiency(result, options = NULL)
result |
An MCMCresult object, normally a list element
returned by |
... |
Possible additional arguments to metric functions. |
options |
A (metric-specific) list of named control options accepted by some metrics. |
A metric is a summary of MCMC output. The summary may include results for each parameter, for each MCMC sample (across all parameters), and/or by arbitrary list. The last option is not used by any built-in metrics.
The built-in metrics include:
mean : mean for each parameter
median : median for each parameter
sd : standard deviation for each parameter
CI95 : both ends of 95% credible interval, a combination of CI95low and CI95upp
CI95low : lower end of 95% credible interval
CI95upp : upper end of 95% credible interval
ESS : effective sample size (ESS). Control options include
ESSfun
(a function to estimate ESS, with default =
coda::effectiveSize
), and suffix
(a character string to be
appended to "ESS" to form a label, with default = "").
efficiency or (synonomously) efficiency_coda : effective sample
size (ESS) and efficiency (ESS / computation time). If ESS
was
already calculated, it will not be re-calculated. Control options
include ESSfun
(passed to ESS
), suffix
(a character string to
be appended to "efficiency" to form a label, with default = ""),
and time
(a character string to be used as an expression to
calculate the computation time from elements of the times
element
of the result
object, with default = "sampling" for
burning+postburnin times).
A list that may contain elements named:
byParameter
: A named list of vectors. In each vector,
the elements correspond to parameters. The list names
will become parameter names in the byParameter
element of
metrics
elements in MCMCresult
objects.
byMCMC
: A named list of numbers.
It is also valid to return a list of such lists.
In normal use, metrics are called by addMetrics
(possibly from
compareMCMCs
) and the results are collated in the metrics
field
of MCMCresult
objects.