loo_compare()

Compare two PSIS-LOO results computed on the same observations.

Usage

Source

loo_compare(
    result1,
    result2,
)

The standard error of the difference uses the pointwise LOO values from both models, which gives a paired comparison that accounts for correlation across observations (Vehtari et al., 2017).

Parameters

result1: LOOResult

LOO results from two models fitted to the same data. Must have the same number of observations.

result2: LOOResult
LOO results from two models fitted to the same data. Must have the same number of observations.

Returns

LOOComparison
Contains elpd_diff = result1.elpd_loo - result2.elpd_loo and its standard error.