Skip to content

Commit 0c31c1b

Browse files
authored
Merge pull request #1148 from stan-dev/citations
Added references for some functions
2 parents 4b54eab + b13fb07 commit 0c31c1b

10 files changed

Lines changed: 182 additions & 60 deletions

R/fit.R

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,15 @@ lp_approx <- function() {
768768
#' The `$print()` method returns the fitted model object itself (invisibly),
769769
#' which is the standard behavior for print methods in \R.
770770
#'
771+
#' @references
772+
#' * Vehtari, A., Gelman, A., Simpson, D., Carpenter, B., and Buerkner, P.-C.
773+
#' (2021). Rank-normalization, folding, and localization: An improved R-hat
774+
#' for assessing convergence of MCMC (with discussion).
775+
#' *Bayesian Analysis*, 16(2), 667-718. doi:10.1214/20-BA1221.
776+
#' * Vehtari, A. (2021). Comparison of MCMC effective sample size estimators.
777+
#' https://avehtari.github.io/rhat_ess/ess_comparison.html
778+
#' (for ESS diagnostics such as `ess_bulk` and `ess_tail`).
779+
#'
771780
#' @seealso [`CmdStanMCMC`], [`CmdStanMLE`], [`CmdStanLaplace`], [`CmdStanVB`], [`CmdStanGQ`]
772781
#'
773782
#' @examples
@@ -1524,6 +1533,19 @@ CmdStanMCMC <- R6::R6Class(
15241533
#' @return The object returned by [loo::loo.array()] or
15251534
#' [loo::loo_moment_match.default()].
15261535
#'
1536+
#' @references
1537+
#' * Vehtari, A., Gelman, A., and Gabry, J. (2017). Practical Bayesian model
1538+
#' evaluation using leave-one-out cross-validation and WAIC.
1539+
#' *Statistics and Computing*, 27(5), 1413-1432.
1540+
#' doi:10.1007/s11222-016-9696-4.
1541+
#' * Vehtari, A., Simpson, D., Gelman, A., Yao, Y., and Gabry, J. (2024).
1542+
#' Pareto smoothed importance sampling.
1543+
#' *Journal of Machine Learning Research*, 25(72), 1-58.
1544+
#' * Paananen, T., Piironen, J., Buerkner, P.-C., and Vehtari, A. (2021).
1545+
#' Implicitly adaptive importance sampling.
1546+
#' *Statistics and Computing*, 31, 16. doi:10.1007/s11222-020-09982-2
1547+
#' (for `moment_match = TRUE`).
1548+
#'
15271549
#' @seealso The \pkg{loo} package website with
15281550
#' [documentation](https://mc-stan.org/loo/reference/index.html) and
15291551
#' [vignettes](https://mc-stan.org/loo/articles/).

R/model.R

Lines changed: 64 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,19 @@ CmdStanModel$set("public", name = "format", value = format)
10971097
#'
10981098
#' @return A [`CmdStanMCMC`] object.
10991099
#'
1100-
#' @template seealso-docs
1100+
#' @references
1101+
#' * Hoffman, M. D., and Gelman, A. (2014). The No-U-Turn sampler:
1102+
#' adaptively setting path lengths in Hamiltonian Monte Carlo.
1103+
#' *Journal of Machine Learning Research*, 15(47), 1593-1623.
1104+
#' * Betancourt, M. (2017). A conceptual introduction to Hamiltonian Monte Carlo.
1105+
#' arXiv:1701.02434. Appendix A describes Stan's dynamic HMC/NUTS implementation.
1106+
#' * Stan Development Team. Stan Reference Manual (Algorithms section):
1107+
#' https://mc-stan.org/docs/reference-manual/
1108+
#' * Stan Development Team. Stan documentation:
1109+
#' https://mc-stan.org/users/documentation/
1110+
#' * Stan Development Team. CmdStan User's Guide:
1111+
#' https://mc-stan.org/docs/cmdstan-guide/
1112+
#'
11011113
#' @inherit cmdstan_model examples
11021114
#'
11031115
sample <- function(data = NULL,
@@ -1247,7 +1259,19 @@ CmdStanModel$set("public", name = "sample", value = sample)
12471259
#'
12481260
#' @return A [`CmdStanMCMC`] object.
12491261
#'
1250-
#' @template seealso-docs
1262+
#' @references
1263+
#' * Hoffman, M. D., and Gelman, A. (2014). The No-U-Turn sampler:
1264+
#' adaptively setting path lengths in Hamiltonian Monte Carlo.
1265+
#' *Journal of Machine Learning Research*, 15(47), 1593-1623.
1266+
#' * Betancourt, M. (2017). A conceptual introduction to Hamiltonian Monte Carlo.
1267+
#' arXiv:1701.02434. Appendix A describes Stan's dynamic HMC/NUTS implementation.
1268+
#' * Stan Development Team. Stan Reference Manual (Algorithms section):
1269+
#' https://mc-stan.org/docs/reference-manual/
1270+
#' * Stan Development Team. Stan documentation:
1271+
#' https://mc-stan.org/users/documentation/
1272+
#' * Stan Development Team. CmdStan User's Guide:
1273+
#' https://mc-stan.org/docs/cmdstan-guide/
1274+
#'
12511275
#' @seealso The Stan Math Library's documentation
12521276
#' ([mc-stan.org/math](https://mc-stan.org/math/)) for more
12531277
#' details on MPI support in Stan.
@@ -1407,7 +1431,14 @@ CmdStanModel$set("public", name = "sample_mpi", value = sample_mpi)
14071431
#'
14081432
#' @return A [`CmdStanMLE`] object.
14091433
#'
1410-
#' @template seealso-docs
1434+
#' @references
1435+
#' * Stan Development Team. Stan Reference Manual (Algorithms section, optimization):
1436+
#' https://mc-stan.org/docs/reference-manual/
1437+
#' * Stan Development Team. Stan documentation:
1438+
#' https://mc-stan.org/users/documentation/
1439+
#' * Stan Development Team. CmdStan User's Guide:
1440+
#' https://mc-stan.org/docs/cmdstan-guide/
1441+
#'
14111442
#' @inherit cmdstan_model examples
14121443
#'
14131444
optimize <- function(data = NULL,
@@ -1529,7 +1560,14 @@ CmdStanModel$set("public", name = "optimize", value = optimize)
15291560
#'
15301561
#' @return A [`CmdStanLaplace`] object.
15311562
#'
1532-
#' @template seealso-docs
1563+
#' @references
1564+
#' * Stan Development Team. Stan Reference Manual (Algorithms section, Laplace approximation):
1565+
#' https://mc-stan.org/docs/reference-manual/
1566+
#' * Stan Development Team. Stan documentation:
1567+
#' https://mc-stan.org/users/documentation/
1568+
#' * Stan Development Team. CmdStan User's Guide:
1569+
#' https://mc-stan.org/docs/cmdstan-guide/
1570+
#'
15331571
#' @examples
15341572
#' \dontrun{
15351573
#' file <- file.path(cmdstan_path(), "examples/bernoulli/bernoulli.stan")
@@ -1694,7 +1732,17 @@ CmdStanModel$set("public", name = "laplace", value = laplace)
16941732
#'
16951733
#' @return A [`CmdStanVB`] object.
16961734
#'
1697-
#' @template seealso-docs
1735+
#' @references
1736+
#' * Kucukelbir, A., Tran, D., Ranganath, R., Gelman, A., and Blei, D. M.
1737+
#' (2017). Automatic differentiation variational inference.
1738+
#' *Journal of Machine Learning Research*, 18(14), 1-45.
1739+
#' * Stan Development Team. Stan Reference Manual (Algorithms section, variational inference):
1740+
#' https://mc-stan.org/docs/reference-manual/
1741+
#' * Stan Development Team. Stan documentation:
1742+
#' https://mc-stan.org/users/documentation/
1743+
#' * Stan Development Team. CmdStan User's Guide:
1744+
#' https://mc-stan.org/docs/cmdstan-guide/
1745+
#'
16981746
#' @inherit cmdstan_model examples
16991747
#'
17001748
variational <- function(data = NULL,
@@ -1834,7 +1882,17 @@ CmdStanModel$set("public", name = "variational", value = variational)
18341882
#' pathfinder runs in multi-pathfinder.
18351883
#' @return A [`CmdStanPathfinder`] object.
18361884
#'
1837-
#' @template seealso-docs
1885+
#' @references
1886+
#' * Zhang, L., Carpenter, B., Gelman, A., and Vehtari, A. (2022).
1887+
#' Pathfinder: parallel quasi-Newton variational inference.
1888+
#' *Journal of Machine Learning Research*, 23(306), 1-49.
1889+
#' * Stan Development Team. Stan Reference Manual (Algorithms section, Pathfinder):
1890+
#' https://mc-stan.org/docs/reference-manual/
1891+
#' * Stan Development Team. Stan documentation:
1892+
#' https://mc-stan.org/users/documentation/
1893+
#' * Stan Development Team. CmdStan User's Guide:
1894+
#' https://mc-stan.org/docs/cmdstan-guide/
1895+
#'
18381896
#' @inherit cmdstan_model examples
18391897
#'
18401898
pathfinder <- function(data = NULL,

man/fit-method-loo.Rd

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/fit-method-summary.Rd

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/model-method-laplace.Rd

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/model-method-optimize.Rd

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/model-method-pathfinder.Rd

Lines changed: 12 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/model-method-sample.Rd

Lines changed: 14 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/model-method-sample_mpi.Rd

Lines changed: 14 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/model-method-variational.Rd

Lines changed: 12 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)