Skip to contents

A convenience function that collects all given metrics at once. This can save time compared to manually calling all metric functions individually, as some variables can be reused instead of being calculated multiple times.

Usage

metric_list_handler(fit, metrics, data_gen_output, fit_conf, ...)

Arguments

fit

A brmsfit object.

metrics

A vector of metric identifiers. See details for supported identifiers.

Value

A named list containing all requested metrics' results.

Details

Currently, the following identifiers are supported. See linked functions for required additional arguments:

  • "bias": posterior_bias()

  • "divergents": divergents()

  • "ess": ess()

  • "elpd_loo": elpd_loo()

  • "elpd_newdata": elpd_newdata()

  • "epred": epred()

  • "mae_s":

  • "p_mean": p_mean()

  • "p_sd": p_sd()

  • "pareto_k":

  • "pos_prob":

  • "ppred":

  • "pq":

  • "q_true":

  • "r2_loo":

  • "r2_newdata":

  • "residuals":

  • "rhat":

  • "rmse_loo":

  • "rmse_newdata":

  • "rmse_s":

  • "rstar":

  • "time_sampling":

  • "time_total":

  • "time_warmup":

  • "y":

Note,that not all identifiers are supported for each input class.