Skip to content

Commit

Permalink
update effectsize, remove chen2010 test, update snapshots (#473)
Browse files Browse the repository at this point in the history
* update effectsize, remove chen2010 test, update snapshots

* update word list, devel versions for see, performance, bayestestR
  • Loading branch information
rempsyc authored Dec 12, 2024
1 parent 9670445 commit b29eb47
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 33 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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
7 changes: 6 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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`.
Expand Down
12 changes: 8 additions & 4 deletions R/report_htest_chi2.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
")"
Expand All @@ -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),
")"
Expand Down
8 changes: 1 addition & 7 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ BayesFactor
BibLaTeX
CMD
CSL
Dom
ELPD
ENP
ESS
Expand All @@ -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
Expand Down
16 changes: 2 additions & 14 deletions tests/testthat/_snaps/windows/report.htest-chi2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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])

---

Expand Down
5 changes: 0 additions & 5 deletions tests/testthat/test-report.htest-chi2.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit b29eb47

Please sign in to comment.