Skip to content

Commit b118da2

Browse files
committed
remove simplify argument from print.compare.loo_ss
1 parent b993b44 commit b118da2

File tree

3 files changed

+3
-22
lines changed

3 files changed

+3
-22
lines changed

R/loo_compare.R

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
#'
33
#' @description Compare fitted models based on [ELPD][loo-glossary].
44
#'
5-
#' By default the print method shows only the most important information. Use
6-
#' `print(..., simplify=FALSE)` to print a more detailed summary.
7-
#'
85
#' @export
96
#' @param x An object of class `"loo"` or a list of such objects. If a list is
107
#' used then the list names will be used as the model names in the output. See
@@ -74,10 +71,6 @@
7471
#' comp <- loo_compare(loo1, loo2, loo3)
7572
#' print(comp, digits = 2)
7673
#'
77-
#' # show more details with simplify=FALSE
78-
#' # (will be the same for all models in this artificial example)
79-
#' print(comp, simplify = FALSE, digits = 3)
80-
#'
8174
#' # can use a list of objects with custom names
8275
#' # will use apple, banana, and cherry, as the names in the output
8376
#' loo_compare(list("apple" = loo1, "banana" = loo2, "cherry" = loo3))

R/loo_compare.psis_loo_ss_list.R

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,9 @@ loo_compare_checks.psis_loo_ss_list <- function(loos) {
173173

174174
#' @rdname loo_compare
175175
#' @export
176-
print.compare.loo_ss <- function(x, ..., digits = 1, simplify = TRUE) {
176+
print.compare.loo_ss <- function(x, ..., digits = 1) {
177177
xcopy <- x
178-
if (inherits(xcopy, "old_compare.loo")) {
179-
if (NCOL(xcopy) >= 2 && simplify) {
180-
patts <- "^elpd_|^se_diff|^p_|^waic$|^looic$"
181-
xcopy <- xcopy[, grepl(patts, colnames(xcopy))]
182-
}
183-
} else if (NCOL(xcopy) >= 2 && simplify) {
178+
if (NCOL(xcopy) >= 2) {
184179
xcopy <- xcopy[, c("elpd_diff", "se_diff", "subsampling_se_diff")]
185180
}
186181
print(.fr(xcopy, digits), quote = FALSE)

man/loo_compare.Rd

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

0 commit comments

Comments
 (0)