diff --git a/DESCRIPTION b/DESCRIPTION index c666f81e..59a503c5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: report Type: Package Title: Automated Reporting of Results and Statistical Models -Version: 0.5.9.1 +Version: 0.5.9.2 Authors@R: c(person(given = "Dominique", family = "Makowski", @@ -154,4 +154,4 @@ Collate: 'utils_misspelled_variables.R' 'zzz.R' Roxygen: list(markdown = TRUE) -Remotes: easystats/insight +Remotes: easystats/insight, easystats/effectsize, easystats/see, easystats/performance, easystats/bayestestR diff --git a/NEWS.md b/NEWS.md index 088a2958..ab84f1e4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +# report 0.6.0 + +Minor changes +* `report_htest_chi2` stops supporting rule "chen2010" (following change in `effectsize`). + # report 0.5.9 Breaking @@ -9,7 +14,7 @@ Breaking * `report_participants()` * `report_sample()` -Minor changes +Minor changes * `report` now supports reporting of Bayesian model comparison with variables of class `brms::loo_compare`. * `report` now supports reporting of BayesFactor objects with variables of class `BFBayesFactor`. diff --git a/R/report_htest_chi2.R b/R/report_htest_chi2.R index e051f001..308c0c8c 100644 --- a/R/report_htest_chi2.R +++ b/R/report_htest_chi2.R @@ -98,11 +98,16 @@ chi2_type <- function(x) { # report_parameters ---------------------------- .report_parameters_chi2 <- function(table, stats, effsize, ...) { + if (is.null(attributes(effsize)$interpretation)) { + and <- "" + } else { + and <- paste0(", and ", attributes(effsize)$interpretation) + } + text_full <- paste0( "statistically ", effectsize::interpret_p(table$p, rules = "default"), - ", and ", - attributes(effsize)$interpretation, + and, " (", stats, ")" @@ -111,8 +116,7 @@ chi2_type <- function(x) { text_short <- paste0( "statistically ", effectsize::interpret_p(table$p, rules = "default"), - ", and ", - attributes(effsize)$interpretation, + and, " (", summary(stats), ")" diff --git a/inst/WORDLIST b/inst/WORDLIST index 59204c57..4d7d8dde 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -4,7 +4,6 @@ BayesFactor BibLaTeX CMD CSL -Dom ELPD ENP ESS @@ -25,26 +24,21 @@ Sivula Vehtari amongst anova -bmwiernik brms +chen eXistence easystats elpd github htest ivreg -lifecycle -mattansb pacakges participants’ -patilindrajeets -rempsyc repo reproducibility rstanarm sIgnificance setosa -strengejacke tidyverse unarchive versicolor diff --git a/tests/testthat/_snaps/windows/report.htest-chi2.md b/tests/testthat/_snaps/windows/report.htest-chi2.md index 937bddf6..2c7e52ac 100644 --- a/tests/testthat/_snaps/windows/report.htest-chi2.md +++ b/tests/testthat/_snaps/windows/report.htest-chi2.md @@ -143,18 +143,6 @@ statistically significant, and medium (chi2 = 31.57, p < .001; Cohen's h = 0.74, 95% CI [0.50, 0.99]) ---- - - Code - report(x, type = "oddsratio", rules = "chen2010") - Output - Effect sizes were labelled following Chen's (2010) recommendations. - - The Pearson's Chi-squared test with Yates' continuity correction of - independence between Diagnosis and Group suggests that the effect is - statistically significant, and medium (chi2 = 31.57, p < .001; Odds ratio = - 4.73, 95% CI [2.74, 8.17]) - --- Code @@ -164,8 +152,8 @@ The Pearson's Chi-squared test with Yates' continuity correction of independence between Diagnosis and Group suggests that the effect is - statistically significant, and (chi2 = 31.57, p < .001; Risk_ratio = 2.54, 95% - CI [1.80, 3.60]) + statistically significant (chi2 = 31.57, p < .001; Risk_ratio = 2.54, 95% CI + [1.80, 3.60]) --- diff --git a/tests/testthat/test-report.htest-chi2.R b/tests/testthat/test-report.htest-chi2.R index 083234e2..1ed2e99e 100644 --- a/tests/testthat/test-report.htest-chi2.R +++ b/tests/testthat/test-report.htest-chi2.R @@ -81,11 +81,6 @@ test_that("report.htest-chi2 report", { report(x, type = "cohens_h", rules = "sawilowsky2009") ) - expect_snapshot( - variant = "windows", - report(x, type = "oddsratio", rules = "chen2010") - ) - expect_snapshot( variant = "windows", report(x, type = "riskratio")