Learn R Programming

HelpersMG (version 2026.2.28)

Probability_Best_Model_WAIC: Return the probability of models compared with loo being the best

Description

Calculate the probability of models compared with loo being the best.

Usage

Probability_Best_Model_WAIC(
  loos = stop("Results from loo::loo_compare() must be provided"),
  column.mean = "elpd_diff",
  column.se = "se_diff",
  order = TRUE,
  nreplicates = 10000,
  print = TRUE
)

Value

A data.frame with the result of loo:compare()

Arguments

loos

A named vector object

column.mean

Name of the column of loos with means to compare.

column.se

Name of the column of loos with se to compare.

order

If TRUE, higher is better, if FALSE lower is better.

nreplicates

Number of replicates.

print

If TRUE, print the results

Author

Marc Girondot marc.girondot@gmail.com

Details

Probability_Best_Model_WAIC calculates the probability of models compared with loo being the best

See Also

Other AIC: ExtractAIC.glm(), FormatCompareAIC(), compare_AIC(), compare_AICc(), compare_BIC()

Examples

Run this code
if (FALSE) {
Probability_Best_Model_WAIC(llok)
Probability_Best_Model_WAIC(llok, column.mean="elpd_loo", column.se="se_elpd_loo")
Probability_Best_Model_WAIC(llok, column.mean="p_loo", column.se="se_p_loo")
Probability_Best_Model_WAIC(llok, column.mean="looic", column.se="se_looic", order=FALSE)
}

Run the code above in your browser using DataLab