From 3dd00e6c09ddb52bf561eec08025314a81eea739 Mon Sep 17 00:00:00 2001 From: Aki Vehtari Date: Fri, 1 Mar 2024 21:21:19 +0200 Subject: [PATCH] update psis paper reference --- R/diagnostics.R | 6 +++--- R/loo-glossary.R | 2 +- R/loo-package.R | 4 ++-- R/loo.R | 4 ++-- R/loo_model_weights.R | 2 +- R/psis.R | 2 +- R/waic.R | 2 +- man-roxygen/loo-and-compare-references.R | 5 +++-- man-roxygen/loo-and-psis-references.R | 3 ++- 9 files changed, 16 insertions(+), 14 deletions(-) diff --git a/R/diagnostics.R b/R/diagnostics.R index a7b489ac..0dc3c9f1 100644 --- a/R/diagnostics.R +++ b/R/diagnostics.R @@ -6,7 +6,7 @@ #' `threshold` value, or plot observation indexes vs. diagnostic estimates. #' The **Details** section below provides a brief overview of the #' diagnostics, but we recommend consulting Vehtari, Gelman, and Gabry (2017) -#' and Vehtari, Simpson, Gelman, Yao, and Gabry (2022) for full details. +#' and Vehtari, Simpson, Gelman, Yao, and Gabry (2024) for full details. #' #' @name pareto-k-diagnostic #' @param x An object created by [loo()] or [psis()]. @@ -23,7 +23,7 @@ #' parameter \eqn{k} of the generalized Pareto distribution. The #' diagnostic threshold for Pareto \eqn{k} depends on sample size #' \eqn{S} (sample size dependent threshold was introduced by Vehtari -#' et al. (2022), and before that fixed thresholds of 0.5 and 0.7 were +#' et al. (2024), and before that fixed thresholds of 0.5 and 0.7 were #' recommended). For simplicity, `loo` package uses the nominal sample #' size \eqn{S} when computing the sample size specific #' threshold. This provides an optimistic threshold if the effective @@ -99,7 +99,7 @@ #' obtain the samples from the proposal distribution via MCMC the **loo** #' package also computes estimates for the Monte Carlo error and the effective #' sample size for importance sampling, which are more accurate for PSIS than -#' for IS and TIS (see Vehtari et al (2022) for details). However, the PSIS +#' for IS and TIS (see Vehtari et al (2024) for details). However, the PSIS #' effective sample size estimate will be #' **over-optimistic when the estimate of \eqn{k} is greater than** #' \eqn{min(1-1/log10(S), 0.7)}, where \eqn{S} is the sample size. diff --git a/R/loo-glossary.R b/R/loo-glossary.R index b13fd15b..291c8b7e 100644 --- a/R/loo-glossary.R +++ b/R/loo-glossary.R @@ -76,7 +76,7 @@ #' #' The diagnostic threshold for Pareto \eqn{k} depends on sample size #' \eqn{S} (sample size dependent threshold was introduced by Vehtari -#' et al., 2022, and before that fixed thresholds of 0.5 and 0.7 were +#' et al., 2024, and before that fixed thresholds of 0.5 and 0.7 were #' recommended). For simplicity, `loo` package uses the nominal sample #' size \eqn{S} when computing the sample size specific #' threshold. This provides an optimistic threshold if the effective diff --git a/R/loo-package.R b/R/loo-package.R index 92682835..12a39200 100644 --- a/R/loo-package.R +++ b/R/loo-package.R @@ -13,7 +13,7 @@ #' *Stan Development Team* #' #' This package implements the methods described in Vehtari, Gelman, and -#' Gabry (2017), Vehtari, Simpson, Gelman, Yao, and Gabry (2022), and +#' Gabry (2017), Vehtari, Simpson, Gelman, Yao, and Gabry (2024), and #' Yao et al. (2018). To get started see the **loo** package #' [vignettes](https://mc-stan.org/loo/articles/index.html), the #' [loo()] function for efficient approximate leave-one-out @@ -33,7 +33,7 @@ #' fast and stable computations for approximate LOO-CV laid out in Vehtari, #' Gelman, and Gabry (2017). From existing posterior simulation draws, we #' compute LOO-CV using Pareto smoothed importance sampling (PSIS; Vehtari, -#' Simpson, Gelman, Yao, and Gabry, 2022), a new procedure for stabilizing +#' Simpson, Gelman, Yao, and Gabry, 2024), a new procedure for stabilizing #' and diagnosing importance weights. As a byproduct of our calculations, #' we also obtain approximate standard errors for estimated predictive #' errors and for comparing of predictive errors between two models. diff --git a/R/loo.R b/R/loo.R index b8899ff6..edb9b9b2 100644 --- a/R/loo.R +++ b/R/loo.R @@ -4,7 +4,7 @@ #' CV, efficient approximate leave-one-out (LOO) cross-validation for Bayesian #' models using Pareto smoothed importance sampling ([PSIS][psis()]). This is #' an implementation of the methods described in Vehtari, Gelman, and Gabry -#' (2017) and Vehtari, Simpson, Gelman, Yao, and Gabry (2022). +#' (2017) and Vehtari, Simpson, Gelman, Yao, and Gabry (2024). #' #' @export loo loo.array loo.matrix loo.function #' @param x A log-likelihood array, matrix, or function. The **Methods (by class)** @@ -500,7 +500,7 @@ mcse_elpd <- function(ll, lw, E_elpd, r_eff, n_samples = NULL) { FUN.VALUE = numeric(1), FUN = function(i) { # Variance in linear scale - # Equation (6) in Vehtari et al. (2022) + # Equation (6) in Vehtari et al. (2024) var_epd_i <- sum(w2[, i] * (lik[, i] - E_epd[i]) ^ 2) / r_eff[i] # Compute variance in log scale by match the variance of a # log-normal approximation diff --git a/R/loo_model_weights.R b/R/loo_model_weights.R index ac39c975..861eae64 100644 --- a/R/loo_model_weights.R +++ b/R/loo_model_weights.R @@ -3,7 +3,7 @@ #' Model averaging via stacking of predictive distributions, pseudo-BMA #' weighting or pseudo-BMA+ weighting with the Bayesian bootstrap. See Yao et #' al. (2018), Vehtari, Gelman, and Gabry (2017), and Vehtari, Simpson, -#' Gelman, Yao, and Gabry (2022) for background. +#' Gelman, Yao, and Gabry (2024) for background. #' #' @export #' @param x A list of `"psis_loo"` objects (objects returned by [loo()]) or diff --git a/R/psis.R b/R/psis.R index 67db61da..1b321d70 100644 --- a/R/psis.R +++ b/R/psis.R @@ -3,7 +3,7 @@ #' Implementation of Pareto smoothed importance sampling (PSIS), a method for #' stabilizing importance ratios. The version of PSIS implemented here #' corresponds to the algorithm presented in Vehtari, Simpson, Gelman, Yao, -#' and Gabry (2022). +#' and Gabry (2024). #' For PSIS diagnostics see the [pareto-k-diagnostic] page. #' #' @export diff --git a/R/waic.R b/R/waic.R index c74dc660..b225ba7e 100644 --- a/R/waic.R +++ b/R/waic.R @@ -29,7 +29,7 @@ #' @seealso #' * The __loo__ package [vignettes](https://mc-stan.org/loo/articles/) and #' Vehtari, Gelman, and Gabry (2017) and Vehtari, Simpson, Gelman, Yao, -#' and Gabry (2022) for more details on why we prefer `loo()` to `waic()`. +#' and Gabry (2024) for more details on why we prefer `loo()` to `waic()`. #' * [loo_compare()] for comparing models on approximate LOO-CV or WAIC. #' #' @references diff --git a/man-roxygen/loo-and-compare-references.R b/man-roxygen/loo-and-compare-references.R index c0003b4a..13571284 100644 --- a/man-roxygen/loo-and-compare-references.R +++ b/man-roxygen/loo-and-compare-references.R @@ -5,8 +5,9 @@ #' ([journal version](https://link.springer.com/article/10.1007/s11222-016-9696-4), #' [preprint arXiv:1507.04544](https://arxiv.org/abs/1507.04544)). #' -#' Vehtari, A., Simpson, D., Gelman, A., Yao, Y., and Gabry, J. (2022). -#' Pareto smoothed importance sampling. +#' Vehtari, A., Simpson, D., Gelman, A., Yao, Y., and Gabry, J. (2024). +#' Pareto smoothed importance sampling. *Journal of Machine Learning Research*, +#' accepted for publication. #' [preprint arXiv:1507.02646](https://arxiv.org/abs/1507.02646) #' #' Sivula, T, Magnusson, M., Matamoros A. A., and Vehtari, A. (2022). diff --git a/man-roxygen/loo-and-psis-references.R b/man-roxygen/loo-and-psis-references.R index 24bdb072..95d8ed3f 100644 --- a/man-roxygen/loo-and-psis-references.R +++ b/man-roxygen/loo-and-psis-references.R @@ -6,6 +6,7 @@ #' [preprint arXiv:1507.04544](https://arxiv.org/abs/1507.04544)). #' #' Vehtari, A., Simpson, D., Gelman, A., Yao, Y., and Gabry, J. (2022). -#' Pareto smoothed importance sampling. +#' Pareto smoothed importance sampling. *Journal of Machine Learning Research*, +#' accepted for publication. #' [preprint arXiv:1507.02646](https://arxiv.org/abs/1507.02646) #'