This function is deprecated. Please use the new model_compare() function
instead. See vignette("migration-guide", package = "loo") for details.
loo_compare() remains an exported generic so that loo_compare methods
registered by other packages keep dispatching as before, but it is frozen at
its previous behavior: it compares "loo", "waic", and "kfold" objects on
ELPD only. Comparing
pred_measure results requires model_compare().
The deprecation warning is issued once per session, so a script that calls
loo_compare() repeatedly is not flooded with warnings.
Usage
loo_compare(x, ...)
# Default S3 method
loo_compare(x, ...)
# S3 method for class 'psis_loo_ss_list'
loo_compare(x, ...)Value
See model_compare(). For the inputs loo_compare() still accepts,
the result is identical to what model_compare() returns.
Examples
LL <- example_loglik_array()
loo1 <- loo(LL)
loo2 <- loo(LL + 1)
# deprecated; identical to model_compare(loo1, loo2)
suppressWarnings(loo_compare(loo1, loo2))
#> model elpd_diff se_diff p_worse diag_diff diag_elpd
#> model2 0.0 0.0 NA
#> model1 -32.0 0.0 1.00 N < 100
#>
#> Diagnostic flags present.
#> See ?`loo-glossary` (sections `diag_diff` and `diag_elpd`)
#> or https://mc-stan.org/loo/reference/loo-glossary.html.
# use this instead
model_compare(loo1, loo2)
#> model elpd_diff se_diff p_worse diag_diff diag_elpd
#> model2 0.0 0.0 NA
#> model1 -32.0 0.0 1.00 N < 100
#>
#> Diagnostic flags present.
#> See ?`loo-glossary` (sections `diag_diff` and `diag_elpd`)
#> or https://mc-stan.org/loo/reference/loo-glossary.html.