From 96dadfd5a00e303f5074435b2917f8de40aaf5c4 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 8 Jul 2024 19:49:01 +0200 Subject: [PATCH] ICC for `beta_family` not accurate #742 --- R/r2.R | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/R/r2.R b/R/r2.R index 0689f3a0c..832142673 100644 --- a/R/r2.R +++ b/R/r2.R @@ -291,6 +291,12 @@ r2.glm <- function(model, ci = NULL, verbose = TRUE, ...) { insight::format_warning("Can't calculate accurate R2 for binomial models that are not Bernoulli models.") } out <- NULL + } else if (info$is_orderedbeta) { + # ordered-beta-regression + out <- r2_ferrari(model, correct_bounds = TRUE) + } else if (info$is_beta) { + # beta-regression + out <- r2_ferrari(model) } else { out <- list(R2_Nagelkerke = r2_nagelkerke(model, ...)) names(out$R2_Nagelkerke) <- "Nagelkerke's R2"