Skip to content

Commit

Permalink
Remove deprecated funs and args
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Oct 22, 2024
1 parent c8c8120 commit b720518
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 48 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: performance
Title: Assessment of Regression Models Performance
Version: 0.12.4.1
Version: 0.12.4.2
Authors@R:
c(person(given = "Daniel",
family = "Lüdecke",
Expand Down
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,6 @@ export(check_multimodal)
export(check_normality)
export(check_outliers)
export(check_overdispersion)
export(check_posterior_predictions)
export(check_predictions)
export(check_residuals)
export(check_singularity)
Expand Down Expand Up @@ -602,7 +601,6 @@ export(performance_rmse)
export(performance_roc)
export(performance_rse)
export(performance_score)
export(posterior_predictive_check)
export(print_html)
export(print_md)
export(r2)
Expand Down
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# performance 0.12.5

## Breaking changes

* Deprecated arguments and alias-function-names have been removed.

## Changes

* Increased accuracy for `check_convergence()` for *glmmTMB* models.

# performance 0.12.4

## Changes
Expand Down
5 changes: 3 additions & 2 deletions R/check_convergence.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ check_convergence.merMod <- function(x, tolerance = 0.001, ...) {


#' @export
check_convergence.glmmTMB <- function(x, ...) {
check_convergence.glmmTMB <- function(x, tolerance = 0.001, ...) {
# https://github.com/glmmTMB/glmmTMB/issues/275
isTRUE(x$sdr$pdHess)
# https://stackoverflow.com/q/79110546/2094622
isTRUE(all.equal(x$fit$convergence, 0, tolerance = tolerance)) && isTRUE(x$sdr$pdHess)
}


Expand Down
9 changes: 1 addition & 8 deletions R/check_heterogeneity_bias.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#' @param nested Logical, if `TRUE`, the data is treated as nested. If `FALSE`,
#' the data is treated as cross-classified. Only applies if `by` contains more
#' than one variable.
#' @param group Deprecated. Use `by` instead.
#'
#' @seealso
#' For further details, read the vignette
Expand All @@ -44,15 +43,9 @@
#' iris$ID <- sample(1:4, nrow(iris), replace = TRUE) # fake-ID
#' check_heterogeneity_bias(iris, select = c("Sepal.Length", "Petal.Length"), by = "ID")
#' @export
check_heterogeneity_bias <- function(x, select = NULL, by = NULL, nested = FALSE, group = NULL) {
check_heterogeneity_bias <- function(x, select = NULL, by = NULL, nested = FALSE) {
insight::check_if_installed("datawizard", minimum_version = "0.12.0")

## TODO: deprecate later
if (!is.null(group)) {
insight::format_warning("Argument `group` is deprecated and will be removed in a future release. Please use `by` instead.") # nolint
by <- group
}

if (insight::is_model(x)) {
by <- insight::find_random(x, split_nested = TRUE, flatten = TRUE)
if (is.null(by)) {
Expand Down
20 changes: 0 additions & 20 deletions R/check_predictions.R
Original file line number Diff line number Diff line change
Expand Up @@ -423,26 +423,6 @@ pp_check.glmmTMB <-
#' S3method(bayesplot::pp_check, BFBayesFactor)



# aliases --------------------------

#' @rdname check_predictions
#' @export
posterior_predictive_check <- function(object, ...) {
.Deprecated("check_predictions()")
check_predictions(object, ...)
}

#' @rdname check_predictions
#' @export
check_posterior_predictions <- function(object, ...) {
.Deprecated("check_predictions()")
check_predictions(object, ...)
}




# methods -----------------------


Expand Down
10 changes: 1 addition & 9 deletions man/check_heterogeneity_bias.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions man/check_predictions.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b720518

Please sign in to comment.