From 7e266991ae4cc4199460d029a121a1b8aa619cb8 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 9 Jul 2024 09:47:38 +0200 Subject: [PATCH] `model_parameters.anova()` includes `df_error` https://github.com/easystats/report/issues/453 --- DESCRIPTION | 2 +- NEWS.md | 9 +++++++-- R/extract_parameters_anova.R | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index c413e1f1b..3bf05b7ed 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: parameters Title: Processing of Model Parameters -Version: 0.22.0.1 +Version: 0.22.0.2 Authors@R: c(person(given = "Daniel", family = "Lüdecke", diff --git a/NEWS.md b/NEWS.md index 782e4b541..4446226a1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,11 @@ * Support for `svy2lme` models from package *svylme*. +## Bug fixes + +* `model_parameters()` for `anova()` from mixed models now also includes the + denominator degrees of freedom in the output (`df_error`). + # parameters 0.22.0 ## Breaking changes @@ -199,7 +204,7 @@ * `as.data.frame` methods for extracting posterior draws via `bootstrap_model()` have been retired. Instead, directly using `bootstrap_model()` is recommended. - + ## Changes to functions * `equivalence_test()` gets a method for `ggeffects` objects from package @@ -351,7 +356,7 @@ * Following functions were moved from package *parameters* to *performance*: `check_sphericity_bartlett()`, `check_kmo()`, `check_factorstructure()` and `check_clusterstructure()`. - + ## Changes to functions * Added `sparse` option to `principal_components()` for sparse PCA. diff --git a/R/extract_parameters_anova.R b/R/extract_parameters_anova.R index 00d8eb485..b46b750ed 100644 --- a/R/extract_parameters_anova.R +++ b/R/extract_parameters_anova.R @@ -49,6 +49,7 @@ names(parameters) <- gsub("Resid. Dev", "Deviance_error", names(parameters), fixed = TRUE) # error-df if (!"df_error" %in% names(parameters)) { + names(parameters) <- gsub("DenDF", "df_error", names(parameters), fixed = TRUE) names(parameters) <- gsub("den Df", "df_error", names(parameters), fixed = TRUE) names(parameters) <- gsub("Res.Df", "df_error", names(parameters), fixed = TRUE) names(parameters) <- gsub("Resid. Df", "df_error", names(parameters), fixed = TRUE)