Skip to content

Commit

Permalink
CRAN 0.7 (#447)
Browse files Browse the repository at this point in the history
* remove format std pars

* version bump

* fix typo

* use updated versions of easystats

* Update cran-comments.md

* run revdep

* add recommendation

* datawiz version bump

* use parameters from CRAN

* Update README.md

* update to roxygen7.2

@IndrajeetPatil

* fix rd issue

* remove bad URL

* Update cran-comments.md

Co-authored-by: Daniel <[email protected]>
  • Loading branch information
mattansb and strengejacke authored May 26, 2022
1 parent b7fe5fe commit 133daee
Show file tree
Hide file tree
Showing 11 changed files with 102 additions and 132 deletions.
20 changes: 7 additions & 13 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.6.0.7
Version: 0.7.0
Authors@R:
c(person(given = "Mattan S.",
family = "Ben-Shachar",
Expand Down Expand Up @@ -56,11 +56,11 @@ BugReports: https://github.com/easystats/effectsize/issues/
Depends:
R (>= 3.4)
Imports:
bayestestR (>= 0.11.5.1),
insight (>= 0.16.0.16),
parameters (>= 0.17.0.10),
performance (>= 0.8.0.8),
datawizard (>= 0.4.0.17),
bayestestR (>= 0.12.1),
insight (>= 0.17.0),
parameters (>= 0.18.0),
performance (>= 0.9.0),
datawizard (>= 0.4.1),
stats,
utils
Suggests:
Expand Down Expand Up @@ -91,17 +91,11 @@ Suggests:
spelling,
testthat,
tidymodels
Remotes:
easystats/insight,
easystats/performance,
easystats/parameters,
easystats/datawizard,
easystats/bayestestR
VignetteBuilder:
knitr
Encoding: UTF-8
Language: en-US
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
RoxygenNote: 7.2.0
Config/testthat/edition: 3
Config/testthat/parallel: true
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ S3method(eta_squared_posterior,brmsfit)
S3method(eta_squared_posterior,stanreg)
S3method(format,effectsize_anova)
S3method(format,effectsize_difference)
S3method(format,effectsize_std_params)
S3method(format,effectsize_table)
S3method(format,equivalence_test_effectsize)
S3method(format,rules)
Expand Down
20 changes: 10 additions & 10 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# effectsize 0.6.0.3
# effectsize 0.7.0

## Breaking Changes

- `standardize_parameters()`, `standardize_posteriors()`, & `standardize_info()` have been moved to the `parameters` package.
- `standardize()` (for models) has been moved to the `datawizard` package.
- `phi()` only works for 2x2 tables.
- `cramers_v()` only works for 2D tables.

## Bug fixes

- `kendalls_w()` now deals with ties.
- `eta_squared()` works with `car::Manova()` that does not have an i-design.
- **`standardize_parameters()`, `standardize_posteriors()`, & `standardize_info()` have been moved to the `parameters` package.**
- **`standardize()` (for models) has been moved to the `datawizard` package.**
- `phi()` only works for 2x2 tables.
- `cramers_v()` only works for 2D tables.

## New features

- `normalized_chi()` gives an adjusted Cohen's *w* for goodness of fit.
- `cohens_w()` is now a fully-fledged function for x-tables and goodness-of-fit effect size (not just an alias for `phi()`).
- Support for `insight`'s `display`, `print_md` and `print_html` for all `{effectsize}` outputs.

## Bug fixes

- `kendalls_w()` now deals with ties.
- `eta_squared()` works with `car::Manova()` that does not have an i-design.

# effectsize 0.6.0.1

*This is a patch release.*
Expand Down
27 changes: 0 additions & 27 deletions R/print.effectsize_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -189,33 +189,6 @@ format.effectsize_anova <- function(x, digits = 2, ...) {
format.effectsize_table(x, digits = digits, ...)
}

#' @export
format.effectsize_std_params <- function(x, digits = 2, ...) {
footer <- caption <- subtitle <- NULL

caption <- sprintf("Standardization method: %s", attr(x, "std_method"))

# robust / two_sd
if (attr(x, "two_sd") || attr(x, "robust")) {
footer <- sprintf("Scaled by %s %s%s from the %s.",
ifelse(attr(x, "two_sd"), "two", "one"),
ifelse(attr(x, "robust"), "MAD", "SD"),
ifelse(attr(x, "two_sd"), "s", ""),
ifelse(attr(x, "robust"), "median", "mean"))
}

# include_response
if (!attr(x, "include_response")) {
resp_footer <- "Response is unstandardized."
footer <- c(footer, resp_footer)
}

attr(x, "table_footer") <- footer
attr(x, "table_caption") <- caption
attr(x, "table_subtitle") <- subtitle
format.effectsize_table(x, digits = digits, ...)
}

#' @export
format.equivalence_test_effectsize <- function(x, digits = 2, ...) {
colnames(x)[colnames(x) == "ROPE_Equivalence"] <- "H0"
Expand Down
20 changes: 13 additions & 7 deletions R/xtab.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,26 @@
#' Pearson's *C* should be used, as they are bounded between 0-1. Cohen's *w*
#' can also be used, but since it is not bounded at 1 (can be larger) its
#' interpretation is more difficult.
#' \cr\cr
#' \cr \cr
#' For goodness-of-fit in 1D tables Cohen's *W*, normalized Chi (\eqn{\chi}) or
#' Pearson's *C* can be used. Cohen's *w* has no upper bound (can be arbitrarily
#' large, depending on the expected distribution). Normalized Chi is an adjusted
#' Cohen's *w*, accounting for the expected distribution, making it bounded
#' between 0-1. Pearson's *C* is also bounded between 0-1.
#' \cr\cr
#' \cr \cr
#' To summarize, for correlation-like effect sizes, we recommend:
#'
#' - For a 2x2 table, use `phi()`
#' - For larger tables, use `cramers_v()`
#' - For goodness-of-fit, use `normalized_chi()`
#' \cr \cr
#' For 2-by-2 contingency tables, Odds ratios, Risk ratios and Cohen's *h* can
#' also be estimated. Note that these are computed with each **column**
#' representing the different groups, and the *first* column representing the
#' treatment group and the *second* column baseline (or control). Effects are
#' given as `treatment / control`. If you wish you use rows as groups you must
#' pass a transposed table, or switch the `x` and `y` arguments.
#' \cr\cr
#' \cr \cr
#' Cohen's *g* is an effect size for dependent (paired) contingency tables
#' ranging between 0 (perfect symmetry) and 0.5 (perfect asymmetry) (see
#' [stats::mcnemar.test()]).
Expand All @@ -48,13 +54,13 @@
#' For Cohen's *g*, confidence intervals are based on the proportion (\eqn{P = g
#' + 0.5}) confidence intervals returned by [stats::prop.test()] (minus 0.5),
#' which give a good close approximation.
#' \cr\cr
#' \cr \cr
#' For Odds ratios, Risk ratios and Cohen's *h*, confidence intervals are
#' estimated using the standard normal parametric method (see Katz et al., 1978;
#' Szumilas, 2010).
#' \cr\cr
#' See *Confidence (Compatibility) Intervals (CIs)*, *CIs and Significance
#' Tests*, and *One-Sided CIs* sections for *phi*, Cohen's *w*, Cramer's *V*,
#' \cr \cr
#' See *Confidence (Compatibility) Intervals (CIs)*, *CIs and Significance Tests*,
#' and *One-Sided CIs* sections for *phi*, Cohen's *w*, Cramer's *V*,
#' Pearson's *C*, and normalized Chi.
#'
#' @inheritSection effectsize_CIs Confidence (Compatibility) Intervals (CIs)
Expand Down
72 changes: 21 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![total](https://cranlogs.r-pkg.org/badges/grand-total/effectsize)](https://cran.r-project.org/package=effectsize/)
[![status](https://tinyverse.netlify.com/badge/effectsize/)](https://CRAN.R-project.org/package=effectsize/)

***Significant is just not enough\!***
***Significant is just not enough!***

The goal of this package is to provide utilities to work with indices of
effect size and standardized parameters, allowing computation and
Expand All @@ -29,21 +29,17 @@ CRAN:
install.packages("effectsize")
```

Or you can install the latest development version `0.6.0.3` from
Or you can install the latest development version `0.6.0.7` from
[*R-universe*](https://easystats.r-universe.dev):

``` r
install.packages("effectsize", repos = "https://easystats.r-universe.dev/")
```

<!-- Or from *GitHub*: -->

<!-- ```{r, warning=FALSE, message=FALSE, eval=FALSE} -->

<!-- if (!require("remotes")) install.packages("remotes") -->

<!-- remotes::install_github("easystats/effectsize") -->

<!-- ``` -->

## Documentation
Expand All @@ -57,21 +53,17 @@ Click on the buttons above to access the package
[**easystats blog**](https://easystats.github.io/blog/posts/), and
check-out these vignettes:

- **Effect Sizes**
- [**Parameter and Model
Standardization**](https://easystats.github.io/effectsize/articles/standardize_parameters.html)
- [**ANOVA Effect
Sizes**](https://easystats.github.io/effectsize/articles/anovaES.html)
- [**Effect Sizes in Bayesian
Models**](https://easystats.github.io/effectsize/articles/bayesian_models.html)
- [**For Simple Hypothesis
- **Effect Sizes**
- [**For Simple Hypothesis
Tests**](https://easystats.github.io/effectsize/articles/simple_htests.html)
- **Effect Sizes Conversion**
- [**Between Effect
- [**ANOVA Effect
Sizes**](https://easystats.github.io/effectsize/articles/anovaES.html)
- **Effect Sizes Conversion**
- [**Between Effect
Sizes**](https://easystats.github.io/effectsize/articles/convert.html)
- [**Effect Size from Test
- [**Effect Size from Test
Statistics**](https://easystats.github.io/effectsize/articles/from_test_statistics.html)
- [**Automated Interpretation of Indices of Effect
- [**Automated Interpretation of Indices of Effect
Size**](https://easystats.github.io/effectsize/articles/interpret.html)

# Features
Expand Down Expand Up @@ -149,38 +141,16 @@ epsilon_squared(model)

And more…

### Regression Models (Standardized Parameters)

Importantly, `effectsize` also provides [advanced
methods](https://easystats.github.io/effectsize/articles/standardize_parameters.html)
to compute standardized parameters for regression models.

``` r
m <- lm(rating ~ complaints + privileges + advance, data = attitude)

standardize_parameters(m)
## # Standardization method: refit
##
## Parameter | Coefficient (std.) | 95% CI
## ------------------------------------------------
## (Intercept) | -9.57e-16 | [-0.22, 0.22]
## complaints | 0.85 | [ 0.58, 1.13]
## privileges | -0.04 | [-0.33, 0.24]
## advance | -0.02 | [-0.26, 0.22]
```

Also, models can be re-fit with standardized data:

``` r
standardize(m)
##
## Call:
## lm(formula = rating ~ complaints + privileges + advance, data = data_std)
##
## Coefficients:
## (Intercept) complaints privileges advance
## -9.57e-16 8.55e-01 -4.35e-02 -2.19e-02
```
<!-- ### Regression Models (Standardized Parameters) -->
<!-- Importantly, `effectsize` also provides [advanced methods](https://easystats.github.io/effectsize/articles/standardize_parameters.html) to compute standardized parameters for regression models. -->
<!-- ```{r beta, warning=FALSE, message=FALSE} -->
<!-- m <- lm(rating ~ complaints + privileges + advance, data = attitude) -->
<!-- standardize_parameters(m) -->
<!-- ``` -->
<!-- Also, models can be re-fit with standardized data: -->
<!-- ```{r std-model, warning=FALSE, message=FALSE} -->
<!-- standardize(m) -->
<!-- ``` -->

## Effect Size Conversion

Expand Down Expand Up @@ -245,7 +215,7 @@ interpret_cohens_d(d = 0.45, rules = "gignac2016")

In order to cite this package, please use the following citation:

- Ben-Shachar M, Lüdecke D, Makowski D (2020). effectsize: Estimation
- Ben-Shachar M, Lüdecke D, Makowski D (2020). effectsize: Estimation
of Effect Size Indices and Standardized Parameters. *Journal of Open
Source Software*, *5*(56), 2815. doi: 10.21105/joss.02815

Expand Down
5 changes: 3 additions & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ All URL issues have been resolved.
* GitHub Actions
- Windows: devel, release, oldrel
- macOS: devel, release, oldrel
- ubuntu-16.04: devel, release, oldrel, 3.6, 3.5, 3.4
- ubuntu-16.04: devel, release, oldrel, 4.0, 3.6, 3.5, 3.4
* win-builder: release


Expand All @@ -18,11 +18,12 @@ All URL issues have been resolved.
### Known issues

- Failed handshake with *shinyapps.io* is a false positive.
- Unavailable DOI link are false positives.


## revdepcheck results

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

* We saw 0 new problems
* We failed to check 0 packages
44 changes: 32 additions & 12 deletions man/effectsize_CIs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 133daee

Please sign in to comment.