Skip to content

Commit

Permalink
Merge pull request #391 from easystats/API
Browse files Browse the repository at this point in the history
NEW: (partial) API
  • Loading branch information
mattansb authored Nov 30, 2021
2 parents 9894b38 + b762d5b commit f5dac59
Show file tree
Hide file tree
Showing 20 changed files with 1,023 additions and 587 deletions.
9 changes: 6 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: effectsize
Title: Indices of Effect Size and Standardized Parameters
Version: 0.5.0.2
Version: 0.5.0.9
Authors@R:
c(person(given = "Mattan S.",
family = "Ben-Shachar",
Expand Down Expand Up @@ -53,9 +53,9 @@ Depends:
Imports:
bayestestR (>= 0.10.5),
insight (>= 0.14.3),
parameters (>= 0.15.0),
parameters (>= 0.15.0.1),
performance (>= 0.8.0),
datawizard (>= 0.2.0),
datawizard (>= 0.2.1.9001),
stats,
utils
Suggests:
Expand Down Expand Up @@ -85,6 +85,9 @@ Suggests:
spelling,
testthat,
tidymodels
Remotes:
easystats/parameters,
easystats/datawizard
VignetteBuilder:
knitr
Encoding: UTF-8
Expand Down
7 changes: 4 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,20 @@ S3method(rb_to_cles,numeric)
S3method(standardize,Surv)
S3method(standardize,bcplm)
S3method(standardize,clm2)
S3method(standardize,coxme)
S3method(standardize,coxph)
S3method(standardize,default)
S3method(standardize,mediate)
S3method(standardize,mlm)
S3method(standardize,wbgee)
S3method(standardize,wbm)
S3method(standardize_info,default)
S3method(standardize_parameters,bootstrap_model)
S3method(standardize_parameters,bootstrap_parameters)
S3method(standardize_parameters,default)
S3method(standardize_parameters,mediate)
S3method(standardize_parameters,model_fit)
S3method(standardize_parameters,parameters_model)
export(.es_aov_simple)
export(.es_aov_strata)
export(.es_aov_table)
export(F_to_d)
export(F_to_epsilon2)
export(F_to_eta2)
Expand Down
7 changes: 5 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# effectsize 0.5.0.1
# effectsize 0.5.0.9

## Breaking Changes

- `pearsons_c()` effect size column name changed to `Pearsons_c` for consistency.

## New features

- `eta_squared()` family now supports `afex::mixed()` models.
- `cles()` for estimating common language effect sizes.
- `rb_to_cles()` for converting rank-biserial correlation to Probability of superiority.

Expand All @@ -15,7 +16,9 @@

## Bug fixes

- `eta_squared()`: fixed a bug that caused `afex_aov` models with more than 2 within-subject factros to return incorrect effect sizes for the lower level factors ( #389 ).
- `standardize()` for multivariate models standardizes the (multivariate) response.
- `standardize()` for models with offsets standardizes offset variables according to `include_response` and `two_sd` ( #396 ).
- `eta_squared()`: fixed a bug that caused `afex_aov` models with more than 2 within-subject factors to return incorrect effect sizes for the lower level factors ( #389 ).

# effectsize 0.5.0

Expand Down
9 changes: 9 additions & 0 deletions R/docs_extra.R
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,12 @@
#' @rdname effectsize_CIs
#' @name effectsize_CIs
NULL


#' `effectsize` API
#'
#' Read the [*Support functions for model extensions*](https://easystats.github.io/effectsize/articles/effectsize_API.html) vignette.
#'
#' @rdname effectsize_API
#' @name effectsize_API
NULL
2 changes: 1 addition & 1 deletion R/effectsize.BFBayesFactor.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ effectsize.BFBayesFactor <- function(model, type = NULL, verbose = TRUE, test =
mu <- 0
D <- samps$delta
} else {
mu <- as.numeric(gsub("Null, mu=", "", model@denominator@shortName))
mu <- model@numerator[[1]]@prior$mu
D <- (samps$mu - mu) / sqrt(samps$sig2)
}

Expand Down
2 changes: 1 addition & 1 deletion R/effectsize.htest.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ effectsize.htest <- function(model, type = NULL, verbose = TRUE, ...) {
return(out)
} else if (grepl("One-way", model$method)) {
# one way anove ----
if (approx <- grepl("not assuming", model$method, fixed = TRUE) && verbose) {
if ((approx <- grepl("not assuming", model$method, fixed = TRUE)) && verbose) {
warning("`var.equal = FALSE` - effect size is an approximation.", call. = FALSE)
}

Expand Down
Loading

0 comments on commit f5dac59

Please sign in to comment.