Skip to content

Commit b29eb47

Browse files
authored
update effectsize, remove chen2010 test, update snapshots (#473)
* update effectsize, remove chen2010 test, update snapshots * update word list, devel versions for see, performance, bayestestR
1 parent 9670445 commit b29eb47

File tree

6 files changed

+19
-33
lines changed

6 files changed

+19
-33
lines changed

DESCRIPTION

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: report
22
Type: Package
33
Title: Automated Reporting of Results and Statistical Models
4-
Version: 0.5.9.1
4+
Version: 0.5.9.2
55
Authors@R:
66
c(person(given = "Dominique",
77
family = "Makowski",
@@ -154,4 +154,4 @@ Collate:
154154
'utils_misspelled_variables.R'
155155
'zzz.R'
156156
Roxygen: list(markdown = TRUE)
157-
Remotes: easystats/insight
157+
Remotes: easystats/insight, easystats/effectsize, easystats/see, easystats/performance, easystats/bayestestR

NEWS.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# report 0.6.0
2+
3+
Minor changes
4+
* `report_htest_chi2` stops supporting rule "chen2010" (following change in `effectsize`).
5+
16
# report 0.5.9
27

38
Breaking
@@ -9,7 +14,7 @@ Breaking
914
* `report_participants()`
1015
* `report_sample()`
1116

12-
Minor changes
17+
Minor changes
1318

1419
* `report` now supports reporting of Bayesian model comparison with variables of class `brms::loo_compare`.
1520
* `report` now supports reporting of BayesFactor objects with variables of class `BFBayesFactor`.

R/report_htest_chi2.R

+8-4
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,16 @@ chi2_type <- function(x) {
9898
# report_parameters ----------------------------
9999

100100
.report_parameters_chi2 <- function(table, stats, effsize, ...) {
101+
if (is.null(attributes(effsize)$interpretation)) {
102+
and <- ""
103+
} else {
104+
and <- paste0(", and ", attributes(effsize)$interpretation)
105+
}
106+
101107
text_full <- paste0(
102108
"statistically ",
103109
effectsize::interpret_p(table$p, rules = "default"),
104-
", and ",
105-
attributes(effsize)$interpretation,
110+
and,
106111
" (",
107112
stats,
108113
")"
@@ -111,8 +116,7 @@ chi2_type <- function(x) {
111116
text_short <- paste0(
112117
"statistically ",
113118
effectsize::interpret_p(table$p, rules = "default"),
114-
", and ",
115-
attributes(effsize)$interpretation,
119+
and,
116120
" (",
117121
summary(stats),
118122
")"

inst/WORDLIST

+1-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ BayesFactor
44
BibLaTeX
55
CMD
66
CSL
7-
Dom
87
ELPD
98
ENP
109
ESS
@@ -25,26 +24,21 @@ Sivula
2524
Vehtari
2625
amongst
2726
anova
28-
bmwiernik
2927
brms
28+
chen
3029
eXistence
3130
easystats
3231
elpd
3332
github
3433
htest
3534
ivreg
36-
lifecycle
37-
mattansb
3835
pacakges
3936
participants’
40-
patilindrajeets
41-
rempsyc
4237
repo
4338
reproducibility
4439
rstanarm
4540
sIgnificance
4641
setosa
47-
strengejacke
4842
tidyverse
4943
unarchive
5044
versicolor

tests/testthat/_snaps/windows/report.htest-chi2.md

+2-14
Original file line numberDiff line numberDiff line change
@@ -143,18 +143,6 @@
143143
statistically significant, and medium (chi2 = 31.57, p < .001; Cohen's h =
144144
0.74, 95% CI [0.50, 0.99])
145145

146-
---
147-
148-
Code
149-
report(x, type = "oddsratio", rules = "chen2010")
150-
Output
151-
Effect sizes were labelled following Chen's (2010) recommendations.
152-
153-
The Pearson's Chi-squared test with Yates' continuity correction of
154-
independence between Diagnosis and Group suggests that the effect is
155-
statistically significant, and medium (chi2 = 31.57, p < .001; Odds ratio =
156-
4.73, 95% CI [2.74, 8.17])
157-
158146
---
159147

160148
Code
@@ -164,8 +152,8 @@
164152
165153
The Pearson's Chi-squared test with Yates' continuity correction of
166154
independence between Diagnosis and Group suggests that the effect is
167-
statistically significant, and (chi2 = 31.57, p < .001; Risk_ratio = 2.54, 95%
168-
CI [1.80, 3.60])
155+
statistically significant (chi2 = 31.57, p < .001; Risk_ratio = 2.54, 95% CI
156+
[1.80, 3.60])
169157

170158
---
171159

tests/testthat/test-report.htest-chi2.R

-5
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,6 @@ test_that("report.htest-chi2 report", {
8181
report(x, type = "cohens_h", rules = "sawilowsky2009")
8282
)
8383

84-
expect_snapshot(
85-
variant = "windows",
86-
report(x, type = "oddsratio", rules = "chen2010")
87-
)
88-
8984
expect_snapshot(
9085
variant = "windows",
9186
report(x, type = "riskratio")

0 commit comments

Comments
 (0)