From ad36239a9edaa4b33364822aad753ff2ebdfb795 Mon Sep 17 00:00:00 2001 From: "Mattan S. Ben-Shachar" Date: Wed, 19 Jun 2024 13:56:00 +0300 Subject: [PATCH] Switch to es_type https://github.com/easystats/parameters/issues/978 --- DESCRIPTION | 4 ++-- R/eta_squared-main.R | 6 +++--- R/eta_squared-methods.R | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 464bae8e..fe4165f5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: effectsize Title: Indices of Effect Size -Version: 0.8.8.1 +Version: 0.8.8.2 Authors@R: c(person(given = "Mattan S.", family = "Ben-Shachar", @@ -73,7 +73,7 @@ Depends: Imports: bayestestR (>= 0.13.2), insight (>= 0.19.10), - parameters (>= 0.21.6), + parameters (>= 0.21.7), performance (>= 0.11.0), datawizard (>= 0.10.0), stats, diff --git a/R/eta_squared-main.R b/R/eta_squared-main.R index ccb79efd..1587f634 100644 --- a/R/eta_squared-main.R +++ b/R/eta_squared-main.R @@ -833,7 +833,7 @@ cohens_f_squared <- function(model, include_intercept = include_intercept ) - attr(out, "anova_type") <- tryCatch(attr(parameters::model_parameters(model, verbose = FALSE, effects = "fixed", effectsize_type = NULL), "anova_type"), + attr(out, "anova_type") <- tryCatch(attr(parameters::model_parameters(model, verbose = FALSE, effects = "fixed", es_type = NULL), "anova_type"), error = function(...) 1 ) attr(out, "approximate") <- TRUE @@ -864,7 +864,7 @@ cohens_f_squared <- function(model, # TODO this should be in .anova_es.anvoa # TODO the aoc method should convert to an anova table, then pass to anova - params <- parameters::model_parameters(model, verbose = verbose, effects = "fixed", effectsize_type = NULL) + params <- parameters::model_parameters(model, verbose = verbose, effects = "fixed", es_type = NULL) out <- .es_aov_simple(as.data.frame(params), type = type, partial = partial, generalized = generalized, @@ -890,7 +890,7 @@ cohens_f_squared <- function(model, verbose = TRUE, include_intercept = FALSE, ...) { - params <- parameters::model_parameters(model, verbose = verbose, effects = "fixed", effectsize_type = NULL) + params <- parameters::model_parameters(model, verbose = verbose, effects = "fixed", es_type = NULL) anova_type <- attr(params, "anova_type") params <- as.data.frame(params) diff --git a/R/eta_squared-methods.R b/R/eta_squared-methods.R index 82e945f5..50636016 100644 --- a/R/eta_squared-methods.R +++ b/R/eta_squared-methods.R @@ -255,7 +255,7 @@ ci = 0.95, alternative = "greater", verbose = TRUE, ...) { - params <- parameters::model_parameters(model, verbose = verbose, effects = "fixed", effectsize_type = NULL) + params <- parameters::model_parameters(model, verbose = verbose, effects = "fixed", es_type = NULL) anova_type <- attr(params, "anova_type") params <- split(params, factor(params$Response, levels = unique(params$Response))) # make sure row order is not changed