From 198578d01e4e85cb1907761b861a59f57ef945bd Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 29 Sep 2023 17:34:27 +0200 Subject: [PATCH] lintr --- R/check_model_diagnostics.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/check_model_diagnostics.R b/R/check_model_diagnostics.R index 371e32609..46a64f9c2 100644 --- a/R/check_model_diagnostics.R +++ b/R/check_model_diagnostics.R @@ -174,10 +174,10 @@ if (inherits(model, "lm", which = TRUE) == 1) { cook_levels <- round(stats::qf(0.5, s$fstatistic[2], s$fstatistic[3]), 2) - } else if (!is.null(threshold)) { - cook_levels <- threshold - } else { + } else if (is.null(threshold)) { cook_levels <- c(0.5, 1) + } else { + cook_levels <- threshold } n_params <- tryCatch(model$rank, error = function(e) insight::n_parameters(model))