From 2f8464c7610ba90e4223133874cfc3036aaf2f85 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 21 Nov 2024 20:51:01 +0100 Subject: [PATCH] check_predictions checks formula --- DESCRIPTION | 2 +- R/check_predictions.R | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index c1e6472aa..89c9a9d57 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: performance Title: Assessment of Regression Models Performance -Version: 0.12.4.5 +Version: 0.12.4.6 Authors@R: c(person(given = "Daniel", family = "Lüdecke", diff --git a/R/check_predictions.R b/R/check_predictions.R index c903f4309..45700313e 100644 --- a/R/check_predictions.R +++ b/R/check_predictions.R @@ -101,6 +101,12 @@ check_predictions.default <- function(object, verbose = TRUE, ...) { .is_model_valid(object) + # check_predictions() can't handle exotic formula notation + insight::formula_ok( + object, + action = "error", + prefix_msg = "Posterior predictive checks failed due to an incompatible model formula." # nolint + ) # retrieve model information minfo <- insight::model_info(object, verbose = FALSE)