Skip to content

Commit 8f140f5

Browse files
committed
Update r_eff documentation
1 parent fe36887 commit 8f140f5

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

R/loo.R

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,11 @@
6363
#' \code{r_eff} argument to pass to the \pkg{loo} package. If \code{TRUE},
6464
#' \pkg{rstanarm} will call \code{\link[loo]{relative_eff}} to compute the
6565
#' \code{r_eff} argument to pass to the \pkg{loo} package. If \code{FALSE}
66-
#' (the default), we avoid computing \code{r_eff}, which can be very slow. The
67-
#' reported ESS and MCSE estimates may be over-optimistic if the posterior
68-
#' draws are far from independent.
66+
#' (the default), we avoid computing \code{r_eff}, which can be very slow.
67+
#' \code{r_eff} measures the amount of autocorrelation in MCMC draws, and is
68+
#' used to compute more accurate ESS and MCSE estimates for pointwise and
69+
#' total ELPDs. When \code{r_eff=FALSE}, the reported ESS and MCSE estimates
70+
#' may be over-optimistic if the posterior draws are far from independent.
6971
#' @return The structure of the objects returned by \code{loo} and \code{waic}
7072
#' methods are documented in detail in the \strong{Value} section in
7173
#' \code{\link[loo]{loo}} and \code{\link[loo]{waic}} (from the \pkg{loo}
@@ -82,10 +84,10 @@
8284
#' distributional assumption and integrate over uncertainty in the parameters.
8385
#' This only assumes that any one observation can be omitted without having a
8486
#' major effect on the posterior distribution, which can be judged using the
85-
#' diagnostic plot provided by the \code{\link[loo:pareto-k-diagnostic]{plot.loo}} method and the
86-
#' warnings provided by the \code{\link[loo]{print.loo}} method (see the
87-
#' \emph{How to Use the rstanarm Package} vignette for an example of this
88-
#' process).
87+
#' diagnostic plot provided by the
88+
#' \code{\link[loo:pareto-k-diagnostic]{plot.loo}} method and the warnings
89+
#' provided by the \code{\link[loo]{print.loo}} method (see the \emph{How to
90+
#' Use the rstanarm Package} vignette for an example of this process).
8991
#'
9092
#' \subsection{How to proceed when \code{loo} gives warnings (k_threshold)}{
9193
#' The \code{k_threshold} argument to the \code{loo} method for \pkg{rstanarm}
@@ -117,7 +119,7 @@
117119
#'
118120
#' @seealso
119121
#' \itemize{
120-
#' \item The new \href{https://mc-stan.org/loo/articles/}{\pkg{loo} package vignettes}
122+
#' \item The \href{https://mc-stan.org/loo/articles/}{\pkg{loo} package vignettes}
121123
#' and various \href{https://mc-stan.org/rstanarm/articles/}{\pkg{rstanarm} vignettes}
122124
#' for more examples using \code{loo} and related functions with \pkg{rstanarm} models.
123125
#' \item \code{\link[loo]{pareto-k-diagnostic}} in the \pkg{loo} package for

0 commit comments

Comments
 (0)