Skip to content

Commit 114d9de

Browse files
authored
Cran 0.7.0.5 (#465)
## Breaking Changes `effectsize` now requires minimal *`R`* version of `3.5`. ## Bug fixes - `cohens_d()` for paired / one sample now gives more accurate CIs (was off by a factor of `(N - 1) / N`; #457) - `kendalls_w()` now deals correctly with singular ties (#448).
1 parent bee3d96 commit 114d9de

File tree

10 files changed

+46
-57
lines changed

10 files changed

+46
-57
lines changed

DESCRIPTION

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: effectsize
33
Title: Indices of Effect Size and Standardized Parameters
4-
Version: 0.7.0.1
4+
Version: 0.7.0.5
55
Authors@R:
66
c(person(given = "Mattan S.",
77
family = "Ben-Shachar",
@@ -59,16 +59,10 @@ Imports:
5959
bayestestR (>= 0.12.1),
6060
insight (>= 0.18.0),
6161
parameters (>= 0.18.1),
62-
performance (>= 0.9.0),
63-
datawizard (>= 0.4.1.10),
62+
performance (>= 0.9.1),
63+
datawizard (>= 0.5.0),
6464
stats,
6565
utils
66-
Remotes:
67-
easystats/datawizard,
68-
easystats/parameters,
69-
easystats/performance,
70-
easystats/correlation,
71-
easystats/bayestestR
7266
Suggests:
7367
correlation (>= 0.8.1),
7468
see (>= 0.7.1),

NEWS.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
# effectsize 0.7.1.9990
2-
3-
## Bug fixes
4-
5-
- `cohens_d()` for paired / one sample now gives more accurate CIs (was off by a factor of `(N - 1) / N`; #457)
6-
7-
# effectsize 0.7.0.9
1+
# effectsize 0.7.0.5
82

93
## Breaking Changes
104

115
`effectsize` now requires minimal *`R`* version of `3.5`.
126

137
## Bug fixes
148

9+
- `cohens_d()` for paired / one sample now gives more accurate CIs (was off by a factor of `(N - 1) / N`; #457)
1510
- `kendalls_w()` now deals correctly with singular ties (#448).
1611

1712
# effectsize 0.7.0

R/effectsize.htest.R

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ effectsize.htest <- function(model, type = NULL, verbose = TRUE, ...) {
5454
args <- list(
5555
t = unname(model$statistic),
5656
df_error = unname(model$parameter),
57-
paired = !grepl("Two", model$method)
57+
paired = !grepl("Two", model$method),
58+
verbose = verbose
5859
)
5960
} else {
6061
if (grepl(" by ", model$data.name, fixed = TRUE)) {
@@ -144,6 +145,7 @@ effectsize.htest <- function(model, type = NULL, verbose = TRUE, ...) {
144145
nrow = nr,
145146
ncol = nc,
146147
p = p,
148+
verbose = verbose,
147149
...
148150
)
149151
} else {
@@ -198,6 +200,7 @@ effectsize.htest <- function(model, type = NULL, verbose = TRUE, ...) {
198200
f = model$statistic,
199201
df = model$parameter[1],
200202
df_error = model$parameter[2],
203+
verbose = verbose,
201204
...
202205
)
203206
colnames(out)[1] <- sub("_partial", "", colnames(out)[1])
@@ -216,9 +219,9 @@ effectsize.htest <- function(model, type = NULL, verbose = TRUE, ...) {
216219
.fail_if_approx(approx, "cohens_g")
217220

218221
if (inherits(data, "table")) {
219-
out <- cohens_g(data, ...)
222+
out <- cohens_g(data, verbose = verbose, ...)
220223
} else {
221-
out <- cohens_g(data[[1]], data[[2]], ...)
224+
out <- cohens_g(data[[1]], data[[2]], verbose = verbose, ...)
222225
}
223226
out
224227
}
@@ -251,7 +254,8 @@ effectsize.htest <- function(model, type = NULL, verbose = TRUE, ...) {
251254
args <- list(
252255
x = data[[1]],
253256
y = if (ncol(data) == 2) data[[2]],
254-
paired = grepl("signed rank", model$method, fixed = TRUE)
257+
paired = grepl("signed rank", model$method, fixed = TRUE),
258+
verbose = verbose
255259
)
256260

257261
if (type == "cles") {
@@ -278,10 +282,10 @@ effectsize.htest <- function(model, type = NULL, verbose = TRUE, ...) {
278282

279283

280284
if (inherits(data, "data.frame")) {
281-
out <- rank_epsilon_squared(data[[1]], data[[2]], ...)
285+
out <- rank_epsilon_squared(data[[1]], data[[2]], verbose = verbose, ...)
282286
} else {
283287
# data frame
284-
out <- rank_epsilon_squared(data, ...)
288+
out <- rank_epsilon_squared(data, verbose = verbose, ...)
285289
}
286290
out
287291
}
@@ -300,7 +304,7 @@ effectsize.htest <- function(model, type = NULL, verbose = TRUE, ...) {
300304
data <- as.data.frame(data)[c("Freq", "Var2", "Var1")]
301305
}
302306

303-
out <- kendalls_w(data[[1]], data[[2]], data[[3]], ...)
307+
out <- kendalls_w(data[[1]], data[[2]], data[[3]], verbose = verbose, ...)
304308
out
305309
}
306310

R/eta_squared.R

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@
111111
#' epsilon_squared(model)
112112
#' cohens_f(model)
113113
#'
114-
#' if (require(see)) plot(eta2)
115-
#'
116114
#' model0 <- aov(mpg ~ am_f + cyl_f, data = mtcars) # no interaction
117115
#' cohens_f_squared(model0, model2 = model)
118116
#'
@@ -125,7 +123,10 @@
125123
#'
126124
#' interpret(eta2, rules = "cohen1992")
127125
#'
128-
#' @examplesIf require("car") && require("afex")
126+
#' @examplesIf require("see") && FALSE
127+
#' plot(eta2) # Requires the {see} package
128+
#'
129+
#' @examplesIf require("car")
129130
#' # Recommended: Type-2 or -3 effect sizes + effects coding
130131
#' # -------------------------------------------------------
131132
#' contrasts(mtcars$am_f) <- contr.sum
@@ -134,28 +135,27 @@
134135
#' model <- aov(mpg ~ am_f * cyl_f, data = mtcars)
135136
#' model_anova <- car::Anova(model, type = 3)
136137
#'
137-
#' eta_squared(model_anova)
138+
#' epsilon_squared(model_anova)
138139
#'
140+
#' @examplesIf require("car") && require("afex")
139141
#' # afex takes care of both type-3 effects and effects coding:
140142
#' data(obk.long, package = "afex")
141143
#' model <- afex::aov_car(value ~ treatment * gender + Error(id / (phase)),
142144
#' data = obk.long, observed = "gender"
143145
#' )
144-
#' eta_squared(model)
145-
#' epsilon_squared(model)
146+
#'
146147
#' omega_squared(model)
147148
#' eta_squared(model, generalized = TRUE) # observed vars are pulled from the afex model.
148149
#'
149-
#' @examplesIf require("lmerTest") && require("lme4")
150+
#' @examplesIf require("lmerTest") && require("lme4") && FALSE
150151
#' ## Approx. effect sizes for mixed models
151152
#' ## -------------------------------------
152153
#' model <- lme4::lmer(mpg ~ am_f * cyl_f + (1 | vs), data = mtcars)
153154
#' omega_squared(model)
154155
#'
155-
#' @examplesIf require(rstanarm) && require(bayestestR) && require(car)
156+
#' @examplesIf require(rstanarm) && require(bayestestR) && require(car) && FALSE
156157
#' ## Bayesian Models (PPD)
157158
#' ## ---------------------
158-
#' \dontrun{
159159
#' fit_bayes <- rstanarm::stan_glm(
160160
#' mpg ~ factor(cyl) * wt + qsec,
161161
#' data = mtcars, family = gaussian(),
@@ -175,7 +175,6 @@
175175
#' )
176176
#' aov_table <- car::Anova(fit_freq, type = 3)
177177
#' eta_squared(aov_table)
178-
#' }
179178
#'
180179
#' @return A data frame containing the effect size values and their confidence
181180
#' intervals.

R/interpret_bf.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@
3939
#' Sociological methodology, 25, 111-164.
4040
#'
4141
#' - Jarosz, A. F., & Wiley, J. (2014). What are the odds? A practical guide to
42-
#' computing and reporting Bayes factors. The Journal of Problem Solving, 7(1),
43-
#' 2.
42+
#' computing and reporting Bayes factors. The Journal of Problem Solving, 7(1), 2.
4443
#'
4544
#' @export
4645
interpret_bf <- function(bf,

cran-comments.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
All URL issues have been resolved.
2+
DOI issues are a false positive.
23

34
## Test environments
45

5-
* local installation: R 4.1.1 on Windows
6+
* local installation: R 4.2.1 on Windows
67
* GitHub Actions
78
- Windows: devel, release, oldrel
8-
- macOS: devel, release, oldrel
9-
- ubuntu-16.04: devel, release, oldrel, 4.0, 3.6, 3.5
9+
- macOS: devel, release, oldrel, 4.0, 3.6, 3.5
10+
- ubuntu-18.04: devel, release, oldrel
1011
* win-builder: release
1112

1213

@@ -23,7 +24,7 @@ All URL issues have been resolved.
2324

2425
## revdepcheck results
2526

26-
We checked 17 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
27+
We checked 16 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
2728

2829
* We saw 0 new problems
2930
* We failed to check 0 packages

man/eta_squared.Rd

Lines changed: 10 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/interpret_bf.Rd

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-effectsize.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,9 @@ if (require("testthat") && require("effectsize")) {
171171
)
172172
)
173173
ft <- friedman.test(RoundingTimes)
174-
expect_equal(effectsize(ft)[[1]], W <- kendalls_w(RoundingTimes)[[1]], ignore_attr = TRUE)
175-
expect_equal(kendalls_w(ft)[[1]], W, ignore_attr = TRUE)
174+
W <- kendalls_w(RoundingTimes, verbose = FALSE, ci = NULL)
175+
expect_equal(effectsize(ft, verbose = FALSE, ci = NULL), W, ignore_attr = TRUE)
176+
expect_equal(kendalls_w(ft, verbose = FALSE, ci = NULL), W, ignore_attr = TRUE)
176177

177178
X <<- c(2.9, 3.0, 2.5, 2.6, 3.2) # normal subjects
178179
Y <<- c(3.8, 2.7, 4.0, 2.4) # with obstructive airway disease

tests/testthat/test-rankES.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ if (require("testthat") && require("effectsize")) {
116116
)
117117
dat
118118

119-
W <- kendalls_w(mrt ~ interaction(condition, congruency) | pno, data = dat)
119+
W <- kendalls_w(mrt ~ interaction(condition, congruency) | pno, data = dat, verbose = FALSE)
120120
expect_equal(W[[1]], 0.4011, tolerance = 0.01)
121121

122122

0 commit comments

Comments
 (0)