Skip to content

Commit 359853a

Browse files
committed
improve loo_compare doc
1 parent f3fcb28 commit 359853a

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

R/loo_compare.R

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#' distribution, a practice derived for Gaussian linear models or
4040
#' asymptotically, and which only applies to nested models in any case.
4141
#'
42-
#' ## `p_worse` and `diag_diff`
42+
#' ## `p_worse`, `diag_diff`, and `diag_elpd`
4343
#' The values in the `p_worse` column show the probability of each model
4444
#' having worse ELPD than the best model. These probabilities are computed
4545
#' with a normal approximation using the values from `elpd_diff` and
@@ -51,9 +51,24 @@
5151
#' * `|elpd_diff| < 4` (models make similar predictions)
5252
#' * `khat > 0.5` (possible outliers)
5353
#'
54-
#' If any of these diagnostic messages is shown, the normal approximation is
55-
#' not well calibrated and the probabilities can be too large (small data or
56-
#' similar predictions) or too small (outliers).
54+
#' If any of these diagnostic messages is shown, the error distribution is
55+
#' skewed or thick tailed and the normal approximation based on `elpd_diff`
56+
#' and `se_diff` is not well calibrated. The probabilities `p_worse` are
57+
#' likely to be too large (small data or similar predictions) or too small
58+
#' (outliers). `elpd_diff` and `se_diff` are still indicative of the
59+
#' differences and uncertainties, and for example, if `|elpd_diff|` is
60+
#' many times larger than `se_diff` the difference is quite certain.
61+
#' While `khat > 0.5` indicates possibility of outliers, it is also
62+
#' possible that both models compared seem to be well specified based
63+
#' on model checking, but the pointwise ELPD differences have such thick tails
64+
#' that the normal approximation for the sum is not good.
65+
#'
66+
#' The column `diag_elpd` shows diagnostic for the pointwise ELPD
67+
#' computations for each model. If `k khat_psis > 0.7` is shown,
68+
#' where `k` is the number of high high Pareto k values in Pareto
69+
#' smoothed importance sampling computation, then there may be
70+
#' significant bias in `elpd_diff` favoring models with a large
71+
#' number of high Pareto k values.
5772
#'
5873
#' ## Warnings for many model comparisons
5974
#' If more than \eqn{11} models are compared, we internally recompute the model

0 commit comments

Comments
 (0)