Learn R Programming

bivarhr (version 0.1.5)

print_floor_smoketest: Print summary of FLOOR smoke test (ELPD ranking invariance)

Description

Nicely prints a summary of the FLOOR smoke test produced by smoketest_floor_elpd_invariance, indicating whether the ELPD-based ranking of models is invariant across different FLOOR constants and listing the combined results.

Usage

print_floor_smoketest(st)

Value

Invisibly returns the input object st, so it can be used in pipes if desired.

Arguments

st

A list returned by smoketest_floor_elpd_invariance, containing at least:

  • same_order: logical flag indicating whether the ELPD ranking is identical for all FLOOR values.

  • combined: data frame or tibble with columns FLOOR, fit_id, elpd, elpd_se, and rank_elpd, among others.

Details

The function uses cli to print a section header and an info message stating whether the ELPD ranking is invariant across values of FLOOR. It then arranges the combined table by FLOOR and decreasing elpd, selects a subset of columns, and prints it to the console.

This is a convenience/reporting helper and does not modify st.

Examples

Run this code
# \donttest{
# 1. Define dummy data inside the example so it runs on CRAN checks
st_dummy <- list(
  same_order = TRUE,
  combined = data.frame(
    FLOOR     = rep(c(-1e6, -1e4), each = 2),
    fit_id    = rep(c("model_1", "model_2"), 2),
    elpd      = c(-100.1, -101.3, -100.1, -101.3),
    elpd_se   = c(1.2, 1.3, 1.2, 1.3),
    rank_elpd = c(1L, 2L, 1L, 2L)
  )
)

# 2. Run the function
print_floor_smoketest(st_dummy)
# }

Run the code above in your browser using DataLab