Skip to content

Commit aab19c9

Browse files
authored
Merge pull request #330 from ishaan-arora-1/fix/missing-space-in-order-stat-warning
Fix missing space in order statistics warning message
2 parents e188560 + 7f66ea0 commit aab19c9

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

R/loo_compare.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ loo_order_stat_check <- function(loos, ord) {
327327

328328
if (max(elpd_diff) <= order_stat) {
329329
# flag warning if we suspect no model is theoretically better than the baseline
330-
warning("Difference in performance potentially due to chance.",
330+
warning("Difference in performance potentially due to chance. ",
331331
"See McLatchie and Vehtari (2023) for details.",
332332
call. = FALSE)
333333
}

tests/testthat/test_compare.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ test_that("loo_compare throws appropriate warnings", {
6262
})
6363
expect_warning(
6464
loo_compare(w_list),
65-
"Difference in performance potentially due to chance"
65+
"Difference in performance potentially due to chance. See McLatchie and Vehtari (2023) for details.",
66+
fixed = TRUE
6667
)
6768

6869
w_list_short <- lapply(1:4, function(x) {

0 commit comments

Comments
 (0)