Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
814482a
Updated pkgdown setup with GHA and building in master branch
VisruthSK Jun 13, 2025
72bb3e5
Added favicons, built site
VisruthSK Jun 13, 2025
9e785bc
Added a dependency for vignettes
VisruthSK Jun 13, 2025
743a3cc
Updated dependencies again
VisruthSK Jun 13, 2025
2e472de
Install loo before building vignettes to hopefully resolve some depen…
VisruthSK Jun 13, 2025
e010720
Adding all suggested dependencies
VisruthSK Jun 13, 2025
f15e6dd
Added BH and some params to needs
VisruthSK Jun 13, 2025
94f300b
Added some more dependencies
VisruthSK Jun 13, 2025
f10b83e
Trying to minimize computations and cache results
VisruthSK Jun 13, 2025
a878613
Only run on releases
VisruthSK Jun 13, 2025
4a5110f
Old website
VisruthSK Jun 14, 2025
7235e08
Run dontrun examples
VisruthSK Jun 17, 2025
738f5e6
Deploy dev site alongside release site
VisruthSK Jun 21, 2025
7d23048
Updated CV link
VisruthSK Jun 21, 2025
deb68a7
Don't build site on PRs and removed cache
VisruthSK Aug 26, 2025
7060851
Disable push trigger in pkgdown workflow
VisruthSK Aug 26, 2025
377ee83
Moved to BS5 and used Stan theme
VisruthSK Sep 22, 2025
fe7c6b7
Merge branch 'master' into reformat-packagedown-workflow
VisruthSK Sep 22, 2025
c227bbf
Make sure package gets installed and runs action in a new process.
VisruthSK Sep 22, 2025
46089cb
Typo
VisruthSK Sep 22, 2025
6a16914
Run vignettes by setting environment variable
VisruthSK Sep 23, 2025
cb1aaa9
Correct autocommit of generated files.
VisruthSK Sep 23, 2025
f74670a
Skipping two problematic vignettes; checked in built site.
VisruthSK Sep 23, 2025
56caf30
pkgdown: update docs [skip CI]
VisruthSK Sep 23, 2025
9cebec9
Merge pull request #302 from stan-dev/master
VisruthSK Oct 7, 2025
bdefc8a
Don't skip problem vignettes.
VisruthSK Oct 7, 2025
38b229e
Build site in gh-pages branch automatically
VisruthSK Oct 15, 2025
09a6e8e
Don't delete existing files [ci skip]
VisruthSK Oct 15, 2025
359a71e
update references
avehtari Oct 16, 2025
7b3e9c4
regnerate .Rd files
jgabry Oct 16, 2025
b4c12c3
Merge pull request #303 from stan-dev/update-references
jgabry Oct 16, 2025
89bdf92
Merge pull request #304 from stan-dev/master
VisruthSK Oct 16, 2025
746e326
Correct DESCRIPTION to point to correct theming repository
VisruthSK Oct 17, 2025
cc3a80a
Fixed template package name
VisruthSK Oct 17, 2025
aab2fe2
Trying to simplify dependencies for build
VisruthSK Oct 18, 2025
3bc53fd
Adding pkgdown-config repo as a remote
VisruthSK Oct 18, 2025
e840f59
Point to pkgdown-config only in GHA
VisruthSK Oct 18, 2025
1a5680a
Print sample sizes
VisruthSK Oct 19, 2025
2e1b995
Update .Rbuildignore
VisruthSK Oct 19, 2025
0ddc47b
Merge pull request #292 from stan-dev/reformat-packagedown-workflow
VisruthSK Oct 20, 2025
6e8bb7f
Adding all dependencies back into pkgdown GHA setup
VisruthSK Oct 20, 2025
bab8827
Add one more test using custom model names
jgabry Oct 21, 2025
240e82e
Merge pull request #307 from stan-dev/loo-compare-include-n
VisruthSK Oct 21, 2025
6d78012
Updated layout and restrict concurrency on non-pr jobs only
VisruthSK Oct 22, 2025
3429984
Swap image to logo.svg so it works on GH
VisruthSK Oct 23, 2025
879d73a
Merge pull request #309 from stan-dev/rely-more-on-pkgdown-config
jgabry Oct 23, 2025
f377078
Update .Rbuildignore
jgabry Oct 23, 2025
c00fc2e
Merge pull request #310 from stan-dev/fix-Rbuildignore
jgabry Oct 23, 2025
d014407
Update GitHub Pages deploy action version
VisruthSK Oct 24, 2025
30ecb49
update LOO uncertainty paper to use BA doi
avehtari Oct 28, 2025
4758c52
regenerate Rd files
jgabry Oct 28, 2025
d6fe380
Merge pull request #311 from stan-dev/update-loo-uncertainty-ref
jgabry Oct 28, 2025
9ab94d7
Update documentation for E_loo() function
avehtari Oct 30, 2025
60a484f
minor edits and generate Rd fille
jgabry Oct 30, 2025
03a6932
Merge pull request #312 from stan-dev/avehtari-patch-1
jgabry Oct 30, 2025
af530f4
Update email address
jgabry Nov 24, 2025
1ba5462
Update DESCRIPTION
jgabry Nov 24, 2025
66a0e48
Merge pull request #313 from stan-dev/update-email
jgabry Nov 24, 2025
bbf9e4f
Configure Dependabot for GitHub Actions updates
jgabry Dec 2, 2025
4c5fa56
Bump actions/upload-artifact from 4 to 5
dependabot[bot] Dec 3, 2025
b9ad3fb
Bump actions/checkout from 4 to 6
dependabot[bot] Dec 3, 2025
40d793a
Bump codecov/codecov-action from 4 to 5
dependabot[bot] Dec 3, 2025
4de8e18
Merge pull request #316 from stan-dev/dependabot/github_actions/codec…
jgabry Dec 3, 2025
0d4e808
Merge pull request #315 from stan-dev/dependabot/github_actions/actio…
jgabry Dec 3, 2025
eafbd07
Merge pull request #314 from stan-dev/dependabot/github_actions/actio…
jgabry Dec 3, 2025
ef361c7
Revert "Bump codecov/codecov-action from 4 to 5"
jgabry Dec 3, 2025
30d6677
Merge pull request #317 from stan-dev/revert-316-dependabot/github_ac…
jgabry Dec 3, 2025
2717920
Bump actions/upload-artifact from 5 to 6
dependabot[bot] Dec 15, 2025
05e2d76
NEWS.md for v2.9.0
jgabry Dec 21, 2025
80ed95c
Use short PR references in NEWS.md
jgabry Dec 21, 2025
9618c44
Update loo-package.Rd
jgabry Dec 21, 2025
69f8dd9
fix DOIs
jgabry Dec 21, 2025
8d7d520
Fix Stan syntax error
jgabry Dec 22, 2025
fd95b46
Fix Stan syntax error
jgabry Dec 22, 2025
299a4c7
v2.9.0
jgabry Dec 23, 2025
93333c4
bump to dev version
jgabry Dec 23, 2025
eace28a
Merge pull request #320 from stan-dev/dependabot/github_actions/actio…
jgabry Dec 30, 2025
7fa786c
Update test-coverage.yaml
jgabry Dec 30, 2025
2883f25
Merge pull request #322 from stan-dev/update-test-coverage-workflow
jgabry Dec 30, 2025
06eef2c
Bump actions/upload-artifact from 4 to 6
dependabot[bot] Jan 5, 2026
d1e17ee
Bump actions/checkout from 4 to 6
dependabot[bot] Jan 5, 2026
843ec66
Fix bug in IS method error message and documentation typos
ishaan-arora-1 Feb 21, 2026
d1c2441
Merge pull request #324 from stan-dev/dependabot/github_actions/actio…
VisruthSK Feb 23, 2026
7962cb4
Merge pull request #323 from stan-dev/dependabot/github_actions/actio…
VisruthSK Feb 23, 2026
0331a56
Fixed typo in WAIC reference; changed wording slightly
VisruthSK Feb 23, 2026
2bb5bc2
Redoc
VisruthSK Feb 23, 2026
cb64cf1
Swapped to lf, changed .gitattributes
VisruthSK Feb 27, 2026
62be68d
Update .gitattributes [no ci]
VisruthSK Feb 27, 2026
ec6080c
Revert "Update .gitattributes [no ci]"
VisruthSK Feb 27, 2026
53ecde4
Revert "Swapped to lf, changed .gitattributes"
VisruthSK Feb 27, 2026
2a916b1
Swapped to lf properly
VisruthSK Feb 27, 2026
e188560
Merge pull request #326 from ishaan-arora-1/fix/typos-and-error-messa…
VisruthSK Feb 27, 2026
ad29d7e
Fix missing space in loo_compare order stat warning message
ishaan-arora-1 Feb 27, 2026
7f66ea0
Use fixed = TRUE in test to avoid regex issues with parentheses
ishaan-arora-1 Feb 27, 2026
aab19c9
Merge pull request #330 from ishaan-arora-1/fix/missing-space-in-orde…
jgabry Feb 27, 2026
3870f6d
Bump actions/upload-artifact from 6 to 7
dependabot[bot] Mar 2, 2026
99ac8fd
Merge pull request #334 from stan-dev/dependabot/github_actions/actio…
VisruthSK Mar 2, 2026
2174733
Revert "Bump actions/upload-artifact from 6 to 7"
VisruthSK Mar 2, 2026
095a09e
Merge pull request #335 from stan-dev/revert-334-dependabot/github_ac…
VisruthSK Mar 2, 2026
46dec52
Comment in test-coverage
VisruthSK Mar 2, 2026
d0ca937
Bumped upload artifact step v7
VisruthSK Mar 2, 2026
168b63d
Swap to OIDC for codecovr
VisruthSK Mar 2, 2026
d5e23dd
Merge pull request #336 from stan-dev/upload-artifact-v7
VisruthSK Mar 2, 2026
91d8f22
shortened ?loo_subsample title and slightly edited description
vinniott Mar 19, 2026
e056773
removed @title
vinniott Mar 20, 2026
1e13153
added 'using subsampling to title'
vinniott Mar 20, 2026
7eafeb8
Merge pull request #339 from vinniott/shorten-loo-subsample-title
jgabry Mar 20, 2026
2896b90
Bump codecov/codecov-action from 5 to 6
dependabot[bot] Mar 30, 2026
23f2117
Merge pull request #344 from stan-dev/dependabot/github_actions/codec…
VisruthSK Mar 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ man-roxygen/*
tests/testthat/Rplots\.pdf
^data-raw$
vignettes/loo2-lfo_cache/*
vignettes/loo2-non-factorizable_cache/*
vignettes/loo2-non-factorized_cache/*
^\.appveyor\.yml$
^\.codecov\.yml$
.github/*
.vscode/*
^\.github$
^vignettes/online-only$

^CRAN-SUBMISSION$
^release-prep\.R$
^_pkgdown\.yml$
^pkgdown$
6 changes: 4 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
* text=auto
data/* binary
src/* text=lf
R/* text=lf
src/* text eol=lf
R/* text eol=lf
*.rda binary

11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- uses: r-lib/actions/setup-pandoc@v2

Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
# build dev site on merged pushes
push:
branches: [main, master]
# build full site on releases
release:
types: [published]
workflow_dispatch:

name: pkgdown.yaml

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
cancel-in-progress: true
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v6

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::pkgdown
local::.
any::bayesplot
any::BH
any::brms
any::ggplot2
any::rmarkdown
any::Rcpp
any::RcppEigen
any::RcppParallel
any::rstan
any::rstanarm
any::rstantools
any::spdep
any::StanHeaders
any::knitr
any::withr
stan-dev/pkgdown-config

- name: Build site
run: |
withr::with_envvar(
c("NOT_CRAN" = "true"), # this should already be set by setup-r@v2? keeping because vignettes don't build otherwise
pkgdown::build_site_github_pages(
lazy = FALSE, # change to TRUE if runner times out.
run_dont_run = TRUE,
new_process = TRUE
)
)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
clean: false
branch: gh-pages
folder: docs
19 changes: 11 additions & 8 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ on:

name: test-coverage.yaml

permissions: read-all
permissions:
contents: read
id-token: write

jobs:
test-coverage:
Expand All @@ -16,7 +18,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- uses: r-lib/actions/setup-r@v2
with:
Expand All @@ -34,17 +36,18 @@ jobs:
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
print(cov)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v4
- uses: codecov/codecov-action@v6
with:
# Fail if error if not on PR, or if on PR and token is given
# Fail if error if not on PR, or if on PR and token is given--dependabot is treated like fork
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
file: ./cobertura.xml
plugin: noop
files: ./cobertura.xml
plugins: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}
use_oidc: true

- name: Show testthat output
if: always()
Expand All @@ -55,7 +58,7 @@ jobs:

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
6 changes: 3 additions & 3 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 2.8.0
Date: 2024-07-03 16:27:12 UTC
SHA: 23e68bf5fb8aa9d000358f3bbbf52cf7ee92a99c
Version: 2.9.0
Date: 2025-12-22 18:21:47 UTC
SHA: fd95b46e4868019ff05034384f28f12960f69f33
15 changes: 8 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Type: Package
Package: loo
Title: Efficient Leave-One-Out Cross-Validation and WAIC for Bayesian Models
Version: 2.8.0.9000
Date: 2024-07-03
Version: 2.9.0.9000
Date: 2025-12-22
Authors@R: c(
person("Aki", "Vehtari", , "Aki.Vehtari@aalto.fi", role = "aut"),
person("Jonah", "Gabry", , "jsg2201@columbia.edu", role = c("cre", "aut")),
person("Aki", "Vehtari", email = "Aki.Vehtari@aalto.fi", role = "aut"),
person("Jonah", "Gabry", email = "jgabry@gmail.com", role = c("cre", "aut")),
person("Måns", "Magnusson", role = "aut"),
person("Yuling", "Yao", role = "aut"),
person("Paul-Christian", "Bürkner", role = "aut"),
Expand All @@ -14,9 +14,10 @@ Authors@R: c(
person("Ben", "Goodrich", role = "ctb"),
person("Juho", "Piironen", role = "ctb"),
person("Bruno", "Nicenboim", role = "ctb"),
person("Leevi", "Lindgren", role = "ctb")
person("Leevi", "Lindgren", role = "ctb"),
person("Visruth", "Srimath Kandali", role = "ctb")
)
Maintainer: Jonah Gabry <jsg2201@columbia.edu>
Maintainer: Jonah Gabry <jgabry@gmail.com>
Description: Efficient approximate leave-one-out cross-validation (LOO)
for Bayesian models fit using Markov chain Monte Carlo, as described
in Vehtari, Gelman, and Gabry (2017) <doi:10.1007/s11222-016-9696-4>.
Expand Down Expand Up @@ -58,5 +59,5 @@ Config/testthat/start-first: loo_subsampling_cases, loo_subsampling
Encoding: UTF-8
LazyData: TRUE
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
RoxygenNote: 7.3.3
SystemRequirements: pandoc (>= 1.12.3), pandoc-citeproc
21 changes: 19 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
# loo 2.8.0.9000
# loo (development version)

# loo 2.9.0

* Avoid under and overflows in stacking by @avehtari in #273
* Fix `kfold_split_stratified()` when a group has 1 observation by @jgabry in #278
* Fix `plot_diagnostic(..., label_points = TRUE)` by @annariha in #288
* Use testthat 3e and rely on posterior for ESS by @VisruthSK in #289
* Fixed NAs in `psis_r_eff()` by @VisruthSK in #301
* Print unequal sample sizes in loo_compare by @VisruthSK in #307
* New website theme and pkgdown workflow by @VisruthSK in #292
* Small fix in `loo_model_weights()` doc by @avehtari in #276
* loo_moment_match.R: fix doc for default k_threshold by @jgabry in #279
* Update scrps reference and improve doc by @avehtari in #280
* Fix url in vignette by @jgabry in #282
* Update stacking citation in inst/CITATION by @jgabry in #284
* Added contribution section. by @VisruthSK in #286
* Update LOO uncertainty paper to use BA doi by @avehtari in #311
* Update documentation for `E_loo()` function by @avehtari in #312

Items for next release go here

# loo 2.8.0

Expand Down
13 changes: 7 additions & 6 deletions R/E_loo.R
Original file line number Diff line number Diff line change
@@ -1,13 +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.** 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 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.
Expand Down
4 changes: 2 additions & 2 deletions R/diagnostics.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @name pareto-k-diagnostic
#' @param x An object created by [loo()] or [psis()].
#' @param threshold For `pareto_k_ids()`, `threshold` is the minimum \eqn{k}
#' value to flag (default is a sample size `S` dependend threshold
#' value to flag (default is a sample size `S` dependent threshold
#' `1 - 1 / log10(S)`). For `mcse_loo()`, if any \eqn{k} estimates are
#' greater than `threshold` the MCSE estimate is returned as `NA`
#' See **Details** for the motivation behind these defaults.
Expand Down Expand Up @@ -430,7 +430,7 @@ min_n_eff_by_k <- function(n_eff, kcut) {
#' with bigger sample size S we can achieve estimates with small
#' probability of large error, it is difficult to get accurate MCSE
#' estimates as the bias starts to dominate when k > 0.7 (see Section 3.2.3).
#' Thus the sample size dependend k-ht threshold is capped at 0.7.
#' Thus the sample size dependent k-hat threshold is capped at 0.7.
#' @param S sample size
#' @param ... unused
#' @return threshold
Expand Down
2 changes: 1 addition & 1 deletion R/importance_sampling.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ assert_importance_sampling_method_is_implemented <- function(x){
stop("Importance sampling method '",
x,
"' is not implemented. Implemented methods: '",
paste0(implemented_is_methods, collapse = "', '"),
paste0(implemented_is_methods(), collapse = "', '"),
"'")
}
}
Expand Down
2 changes: 1 addition & 1 deletion R/loo-glossary.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @template bayesvis-reference
#'
#' @description
#' The pages provides definitions to key terms. Also see the
#' This page provides definitions of key terms. Also see the
#' [FAQ page](https://mc-stan.org/loo/articles/online-only/faq.html) on
#' the __loo__ website for answers to frequently asked questions.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/loo-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
#' <https://mc-stan.org>.
#'
#' Watanabe, S. (2010). Asymptotic equivalence of Bayes cross validation and
#' widely application information criterion in singular learning theory.
#' widely applicable information criterion in singular learning theory.
#' *Journal of Machine Learning Research* **11**, 3571-3594.
#'
#' Zhang, J., and Stephens, M. A. (2009). A new and efficient estimation method
Expand Down
2 changes: 1 addition & 1 deletion R/loo.R
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ pointwise_loo_calcs <- function(ll, psis_object) {
#' @param diagnostics Named list containing vector `pareto_k` and vector `n_eff`.
#' @param dims Log likelihood matrix dimensions (attribute of `"psis"` object).
#' @template is_method
#' @param is_object An object of class `"psis"/"tis"/"sis"`, as returned by the [psis()/tis()/sis()] function.
#' @param is_object An object of class `"psis"/"tis"/"sis"`, as returned by the `psis()`/`tis()`/`sis()` function.
#' @return A `'importance_sampling_loo'` object as described in the Value section of the [loo()]
#' function documentation.
#'
Expand Down
14 changes: 10 additions & 4 deletions R/loo_compare.R
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,15 @@ loo_compare_checks <- function(loos) {
stop("All inputs should have class 'loo'.", call.=FALSE)
}

Ns <- sapply(loos, function(x) nrow(x$pointwise))
if (!all(Ns == Ns[1L])) {
stop("Not all models have the same number of data points.", call.=FALSE)
Ns <- vapply(loos, function(x) nrow(x$pointwise), integer(1))
if (any(Ns != Ns[1L])) {
stop(
paste0(
"All models must have the same number of observations, but models have inconsistent observation counts: ",
paste(paste0("'", find_model_names(loos), "' (", Ns, ")"), collapse = ", ")
),
call. = FALSE
)
}

## warnings
Expand Down Expand Up @@ -321,7 +327,7 @@ loo_order_stat_check <- function(loos, ord) {

if (max(elpd_diff) <= order_stat) {
# flag warning if we suspect no model is theoretically better than the baseline
warning("Difference in performance potentially due to chance.",
warning("Difference in performance potentially due to chance. ",
"See McLatchie and Vehtari (2023) for details.",
call. = FALSE)
}
Expand Down
2 changes: 1 addition & 1 deletion R/loo_compare.psis_loo_ss_list.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ loo_compare.psis_loo_ss_list <- function(x, ...) {
return(comp)
}

#' Compare a reference loo object with a comaprison loo object
#' Compare a reference loo object with a comparison loo object
#' @noRd
#' @param ref_loo A named list with a `psis_loo_ss` object.
#' @param compare_loo A named list with a `psis_loo_ss` object.
Expand Down
2 changes: 1 addition & 1 deletion R/loo_model_weights.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#'
#' @export
#' @param x A list of `"psis_loo"` objects (objects returned by [loo()]) or
#' pointwise log-likelihood matrices or , one for each model. If the list
#' pointwise log-likelihood matrices, one for each model. If the list
#' elements are named the names will be used to label the models in the
#' results. Each matrix/object should have dimensions \eqn{S} by \eqn{N},
#' where \eqn{S} is the size of the posterior sample (with all chains merged)
Expand Down
Loading
Loading