From 9ab94d76340bc3e9b4521c01ac769c3c0f9099f8 Mon Sep 17 00:00:00 2001 From: Aki Vehtari Date: Thu, 30 Oct 2025 16:34:39 +0200 Subject: [PATCH 1/2] Update documentation for E_loo() function Clarify the conditions for reliable estimates in E_loo() --- R/E_loo.R | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/R/E_loo.R b/R/E_loo.R index 2fef401a..6789aff6 100644 --- a/R/E_loo.R +++ b/R/E_loo.R @@ -5,9 +5,10 @@ #' [PSIS][psis()] smoothing procedure. The expectations estimated by the #' `E_loo()` function assume that the PSIS approximation is working well. #' **A small [Pareto k][pareto-k-diagnostic] estimate is necessary, -#' but not sufficient, for `E_loo()` to give reliable estimates.** Additional -#' diagnostic checks for gauging the reliability of the estimates are in -#' development and will be added in a future release. +#' but not sufficient, for `E_loo()` to give reliable estimates. If +#' If `log_ratios` argument is provided, `E_loo()` computes also a function +#' specific Pareto k, which needs also to be small for a reliable estimate. +# See more below. #' #' @export #' @param x A numeric vector or matrix. From 60a484fae9d646d2d7d7f4378b01cf703243af32 Mon Sep 17 00:00:00 2001 From: jgabry Date: Thu, 30 Oct 2025 10:40:49 -0600 Subject: [PATCH 2/2] minor edits and generate Rd fille --- R/E_loo.R | 14 +++++++------- man/E_loo.Rd | 13 +++++++------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/R/E_loo.R b/R/E_loo.R index 6789aff6..b449c182 100644 --- a/R/E_loo.R +++ b/R/E_loo.R @@ -1,14 +1,14 @@ #' Compute weighted expectations #' #' The `E_loo()` function computes weighted expectations (means, variances, -#' quantiles) using the importance weights obtained from the -#' [PSIS][psis()] smoothing procedure. The expectations estimated by the -#' `E_loo()` function assume that the PSIS approximation is working well. +#' quantiles) using the importance weights obtained from the [PSIS][psis()] +#' smoothing procedure. The expectations estimated by the `E_loo()` function +#' assume that the PSIS approximation is working well. #' **A small [Pareto k][pareto-k-diagnostic] estimate is necessary, -#' but not sufficient, for `E_loo()` to give reliable estimates. If -#' If `log_ratios` argument is provided, `E_loo()` computes also a function -#' specific Pareto k, which needs also to be small for a reliable estimate. -# See more below. +#' but not sufficient, for `E_loo()` to give reliable estimates**. If the +#' `log_ratios` argument is provided, `E_loo()` also computes a function +#' specific Pareto k diagnostic, which must also be small for a reliable +#' estimate. See more details below. #' #' @export #' @param x A numeric vector or matrix. diff --git a/man/E_loo.Rd b/man/E_loo.Rd index a36585ec..eeb1b231 100644 --- a/man/E_loo.Rd +++ b/man/E_loo.Rd @@ -81,13 +81,14 @@ returned Pareto-k is the Pareto-k for the right tail of \eqn{r}. } \description{ The \code{E_loo()} function computes weighted expectations (means, variances, -quantiles) using the importance weights obtained from the -\link[=psis]{PSIS} smoothing procedure. The expectations estimated by the -\code{E_loo()} function assume that the PSIS approximation is working well. +quantiles) using the importance weights obtained from the \link[=psis]{PSIS} +smoothing procedure. The expectations estimated by the \code{E_loo()} function +assume that the PSIS approximation is working well. \strong{A small \link[=pareto-k-diagnostic]{Pareto k} estimate is necessary, -but not sufficient, for \code{E_loo()} to give reliable estimates.} Additional -diagnostic checks for gauging the reliability of the estimates are in -development and will be added in a future release. +but not sufficient, for \code{E_loo()} to give reliable estimates}. If the +\code{log_ratios} argument is provided, \code{E_loo()} also computes a function +specific Pareto k diagnostic, which must also be small for a reliable +estimate. See more details below. } \examples{ \donttest{