https://github.com/chainsawriot/effectsize
:dragon: Compute and work with indices of effect size and standardized parameters
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 7 DOI reference(s) in README -
✓Academic publication links
Links to: joss.theoj.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.1%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
:dragon: Compute and work with indices of effect size and standardized parameters
Basic Info
- Host: GitHub
- Owner: chainsawriot
- License: gpl-3.0
- Default Branch: main
- Homepage: https://easystats.github.io/effectsize/
- Size: 23 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Fork of easystats/effectsize
Created over 3 years ago
· Last pushed about 2 years ago
https://github.com/chainsawriot/effectsize/blob/main/
# effectsize: Indices of Effect Size[](https://doi.org/10.21105/joss.02815) [](https://cran.r-project.org/package=effectsize/) [](https://cran.r-project.org/package=effectsize/) [](https://CRAN.R-project.org/package=effectsize/) [](https://lifecycle.r-lib.org/articles/stages.html) ***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 conversion of indices such as Cohens *d*, *r*, odds-ratios, etc. ## Installation [](https://cran.r-project.org/package=effectsize/) [](https://easystats.r-universe.dev/) [](https://github.com/easystats/effectsize/actions) [](https://github.com/easystats/effectsize/actions/) [](https://app.codecov.io/gh/easystats/effectsize?branch=main/) Run the following to install the stable release of **effectsize** from CRAN: ``` r install.packages("effectsize") ``` Or you can install the latest development version from [*R-universe*](https://easystats.r-universe.dev): ``` r install.packages("effectsize", repos = "https://easystats.r-universe.dev/") ``` ## Documentation [](https://easystats.github.io/effectsize/) [](https://easystats.github.io/blog/posts/) [](https://easystats.github.io/effectsize/reference/index.html) Click on the buttons above to access the package [**documentation**](https://easystats.github.io/effectsize/) and the [**easystats blog**](https://easystats.github.io/blog/posts/), and check-out these vignettes: - **Effect Sizes** - [**Standardized Differences**](https://easystats.github.io/effectsize/articles/standardized_differences.html) - [**For Contingency Tables**](https://easystats.github.io/effectsize/articles/xtabs.html) - [**ANOVA Effect Sizes**](https://easystats.github.io/effectsize/articles/anovaES.html) - **Effect Sizes Conversion** - [**Between Effect Sizes**](https://easystats.github.io/effectsize/articles/convert_r_d_OR.html) - [**Between Probabilities and Odds and Risk Ratios**](https://easystats.github.io/effectsize/articles/convert_p_OR_RR.html) - [**Effect Size from Test Statistics**](https://easystats.github.io/effectsize/articles/from_test_statistics.html) - [**Automated Interpretation of Indices of Effect Size**](https://easystats.github.io/effectsize/articles/interpret.html) # Features This package is focused on indices of effect size. Check out the package website for [**a full list of features and functions** provided by `effectsize`](https://easystats.github.io/effectsize/reference/index.html). ``` r library(effectsize) options(es.use_symbols = TRUE) # get nice symbols when printing! (On Windows, requires R >= 4.2.0) ``` > **Tip:** > > **Instead of `library(effectsize)`, use `library(easystats)`.** **This > will make all features of the easystats-ecosystem available.** > > **To stay updated, use `easystats::install_latest()`.** ## Effect Size Computation The package provides functions to compute indices of effect size. ### Standardized Differences (Cohens *d*, Hedges *g*, Glass *delta*) ``` r cohens_d(mpg ~ am, data = mtcars) ## Cohen's d | 95% CI ## -------------------------- ## -1.48 | [-2.27, -0.67] ## ## - Estimated using pooled SD. hedges_g(mpg ~ am, data = mtcars) ## Hedges' g | 95% CI ## -------------------------- ## -1.44 | [-2.21, -0.65] ## ## - Estimated using pooled SD. glass_delta(mpg ~ am, data = mtcars) ## Glass' | 95% CI ## ------------------------- ## -1.17 | [-1.93, -0.39] ``` `effectsize` also provides effect sizes for *rank tests*, *common language effect sizes* and more ### Contingency Tables ``` r # Dependence phi(mtcars$am, mtcars$vs) ## (adj.) | 95% CI ## ----------------------- ## 0.00 | [0.00, 1.00] ## ## - One-sided CIs: upper bound fixed at [1.00]. cramers_v(mtcars$am, mtcars$cyl) ## Cramer's V (adj.) | 95% CI ## -------------------------------- ## 0.46 | [0.00, 1.00] ## ## - One-sided CIs: upper bound fixed at [1.00]. # Goodness-of-fit fei(table(mtcars$cyl), p = c(0.1, 0.3, 0.6)) ## | 95% CI ## ------------------- ## 0.27 | [0.17, 1.00] ## ## - Adjusted for non-uniform expected probabilities. ## - One-sided CIs: upper bound fixed at [1.00]. ``` ### ANOVAs (Eta2, Omega2, ) ``` r model <- aov(mpg ~ factor(gear), data = mtcars) eta_squared(model) ## # Effect Size for ANOVA ## ## Parameter | | 95% CI ## ---------------------------------- ## factor(gear) | 0.43 | [0.18, 1.00] ## ## - One-sided CIs: upper bound fixed at [1.00]. omega_squared(model) ## # Effect Size for ANOVA ## ## Parameter | | 95% CI ## ---------------------------------- ## factor(gear) | 0.38 | [0.14, 1.00] ## ## - One-sided CIs: upper bound fixed at [1.00]. epsilon_squared(model) ## # Effect Size for ANOVA ## ## Parameter | | 95% CI ## ---------------------------------- ## factor(gear) | 0.39 | [0.14, 1.00] ## ## - One-sided CIs: upper bound fixed at [1.00]. ``` And more ## Effect Size Conversion The package also provides ways of converting between different effect sizes. ``` r d_to_r(d = 0.2) ## [1] 0.0995 oddsratio_to_riskratio(2.6, p0 = 0.4) ## [1] 1.59 ``` And for recovering effect sizes from test statistics. ``` r F_to_d(15, df = 1, df_error = 60) ## d | 95% CI ## ------------------- ## 1.00 | [0.46, 1.53] F_to_r(15, df = 1, df_error = 60) ## r | 95% CI ## ------------------- ## 0.45 | [0.22, 0.61] F_to_eta2(15, df = 1, df_error = 60) ## (partial) | 95% CI ## --------------------------- ## 0.20 | [0.07, 1.00] ## ## - One-sided CIs: upper bound fixed at [1.00]. ``` ## Effect Size Interpretation The package allows for an automated interpretation of different indices. ``` r interpret_r(r = 0.3) ## [1] "large" ## (Rules: funder2019) ``` Different sets of rules of thumb are implemented ([**guidelines are detailed here**](https://easystats.github.io/effectsize/articles/interpret.html)) and can be easily changed. ``` r interpret_cohens_d(d = 0.45, rules = "cohen1988") ## [1] "small" ## (Rules: cohen1988) interpret_cohens_d(d = 0.45, rules = "gignac2016") ## [1] "moderate" ## (Rules: gignac2016) ``` ### Citation In order to cite this package, please use the following citation: - Ben-Shachar M, Ldecke 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 Corresponding BibTeX entry: @Article{, title = {{e}ffectsize: Estimation of Effect Size Indices and Standardized Parameters}, author = {Mattan S. Ben-Shachar and Daniel Ldecke and Dominique Makowski}, year = {2020}, journal = {Journal of Open Source Software}, volume = {5}, number = {56}, pages = {2815}, publisher = {The Open Journal}, doi = {10.21105/joss.02815}, url = {https://doi.org/10.21105/joss.02815} } # Contributing and Support If you have any questions regarding the the functionality of the package, you may either contact us via email or also [file an issue](https://github.com/easystats/effectsize/issues/). Anyone wishing to contribute to the package by adding functions, features, or in another way, please follow [this guide](https://github.com/easystats/effectsize/blob/main/.github/CONTRIBUTING.md/) and our [code of conduct](https://github.com/easystats/effectsize/blob/main/.github/CODE_OF_CONDUCT.md/).
Owner
- Login: chainsawriot
- Kind: user
- Location: Germany
- Company: @gesistsa
- Website: http://www.chainsawriot.com
- Repositories: 241
- Profile: https://github.com/chainsawriot
[](https://doi.org/10.21105/joss.02815)
[](https://cran.r-project.org/package=effectsize/)
[](https://cran.r-project.org/package=effectsize/)
[](https://CRAN.R-project.org/package=effectsize/)
[](https://lifecycle.r-lib.org/articles/stages.html)
***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
conversion of indices such as Cohens *d*, *r*, odds-ratios, etc.
## Installation
[](https://cran.r-project.org/package=effectsize/)
[](https://easystats.r-universe.dev/)
[](https://github.com/easystats/effectsize/actions)
[](https://github.com/easystats/effectsize/actions/)
[](https://app.codecov.io/gh/easystats/effectsize?branch=main/)
Run the following to install the stable release of **effectsize** from
CRAN:
``` r
install.packages("effectsize")
```
Or you can install the latest development version from
[*R-universe*](https://easystats.r-universe.dev):
``` r
install.packages("effectsize", repos = "https://easystats.r-universe.dev/")
```
## Documentation
[](https://easystats.github.io/effectsize/)
[](https://easystats.github.io/blog/posts/)
[](https://easystats.github.io/effectsize/reference/index.html)
Click on the buttons above to access the package
[**documentation**](https://easystats.github.io/effectsize/) and the
[**easystats blog**](https://easystats.github.io/blog/posts/), and
check-out these vignettes:
- **Effect Sizes**
- [**Standardized
Differences**](https://easystats.github.io/effectsize/articles/standardized_differences.html)
- [**For Contingency
Tables**](https://easystats.github.io/effectsize/articles/xtabs.html)
- [**ANOVA Effect
Sizes**](https://easystats.github.io/effectsize/articles/anovaES.html)
- **Effect Sizes Conversion**
- [**Between Effect
Sizes**](https://easystats.github.io/effectsize/articles/convert_r_d_OR.html)
- [**Between Probabilities and Odds and Risk
Ratios**](https://easystats.github.io/effectsize/articles/convert_p_OR_RR.html)
- [**Effect Size from Test
Statistics**](https://easystats.github.io/effectsize/articles/from_test_statistics.html)
- [**Automated Interpretation of Indices of Effect
Size**](https://easystats.github.io/effectsize/articles/interpret.html)
# Features
This package is focused on indices of effect size. Check out the package
website for [**a full list of features and functions** provided by
`effectsize`](https://easystats.github.io/effectsize/reference/index.html).
``` r
library(effectsize)
options(es.use_symbols = TRUE) # get nice symbols when printing! (On Windows, requires R >= 4.2.0)
```
> **Tip:**
>
> **Instead of `library(effectsize)`, use `library(easystats)`.** **This
> will make all features of the easystats-ecosystem available.**
>
> **To stay updated, use `easystats::install_latest()`.**
## Effect Size Computation
The package provides functions to compute indices of effect size.
### Standardized Differences (Cohens *d*, Hedges *g*, Glass *delta*)
``` r
cohens_d(mpg ~ am, data = mtcars)
## Cohen's d | 95% CI
## --------------------------
## -1.48 | [-2.27, -0.67]
##
## - Estimated using pooled SD.
hedges_g(mpg ~ am, data = mtcars)
## Hedges' g | 95% CI
## --------------------------
## -1.44 | [-2.21, -0.65]
##
## - Estimated using pooled SD.
glass_delta(mpg ~ am, data = mtcars)
## Glass' | 95% CI
## -------------------------
## -1.17 | [-1.93, -0.39]
```
`effectsize` also provides effect sizes for *rank tests*, *common
language effect sizes* and more
### Contingency Tables
``` r
# Dependence
phi(mtcars$am, mtcars$vs)
## (adj.) | 95% CI
## -----------------------
## 0.00 | [0.00, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
cramers_v(mtcars$am, mtcars$cyl)
## Cramer's V (adj.) | 95% CI
## --------------------------------
## 0.46 | [0.00, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
# Goodness-of-fit
fei(table(mtcars$cyl), p = c(0.1, 0.3, 0.6))
## | 95% CI
## -------------------
## 0.27 | [0.17, 1.00]
##
## - Adjusted for non-uniform expected probabilities.
## - One-sided CIs: upper bound fixed at [1.00].
```
### ANOVAs (Eta2, Omega2, )
``` r
model <- aov(mpg ~ factor(gear), data = mtcars)
eta_squared(model)
## # Effect Size for ANOVA
##
## Parameter | | 95% CI
## ----------------------------------
## factor(gear) | 0.43 | [0.18, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
omega_squared(model)
## # Effect Size for ANOVA
##
## Parameter | | 95% CI
## ----------------------------------
## factor(gear) | 0.38 | [0.14, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
epsilon_squared(model)
## # Effect Size for ANOVA
##
## Parameter | | 95% CI
## ----------------------------------
## factor(gear) | 0.39 | [0.14, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
```
And more
## Effect Size Conversion
The package also provides ways of converting between different effect
sizes.
``` r
d_to_r(d = 0.2)
## [1] 0.0995
oddsratio_to_riskratio(2.6, p0 = 0.4)
## [1] 1.59
```
And for recovering effect sizes from test statistics.
``` r
F_to_d(15, df = 1, df_error = 60)
## d | 95% CI
## -------------------
## 1.00 | [0.46, 1.53]
F_to_r(15, df = 1, df_error = 60)
## r | 95% CI
## -------------------
## 0.45 | [0.22, 0.61]
F_to_eta2(15, df = 1, df_error = 60)
## (partial) | 95% CI
## ---------------------------
## 0.20 | [0.07, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
```
## Effect Size Interpretation
The package allows for an automated interpretation of different indices.
``` r
interpret_r(r = 0.3)
## [1] "large"
## (Rules: funder2019)
```
Different sets of rules of thumb are implemented ([**guidelines are
detailed
here**](https://easystats.github.io/effectsize/articles/interpret.html))
and can be easily changed.
``` r
interpret_cohens_d(d = 0.45, rules = "cohen1988")
## [1] "small"
## (Rules: cohen1988)
interpret_cohens_d(d = 0.45, rules = "gignac2016")
## [1] "moderate"
## (Rules: gignac2016)
```
### Citation
In order to cite this package, please use the following citation:
- Ben-Shachar M, Ldecke 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
Corresponding BibTeX entry:
@Article{,
title = {{e}ffectsize: Estimation of Effect Size Indices and Standardized Parameters},
author = {Mattan S. Ben-Shachar and Daniel Ldecke and Dominique Makowski},
year = {2020},
journal = {Journal of Open Source Software},
volume = {5},
number = {56},
pages = {2815},
publisher = {The Open Journal},
doi = {10.21105/joss.02815},
url = {https://doi.org/10.21105/joss.02815}
}
# Contributing and Support
If you have any questions regarding the the functionality of the
package, you may either contact us via email or also [file an
issue](https://github.com/easystats/effectsize/issues/). Anyone wishing
to contribute to the package by adding functions, features, or in
another way, please follow [this
guide](https://github.com/easystats/effectsize/blob/main/.github/CONTRIBUTING.md/)
and our [code of
conduct](https://github.com/easystats/effectsize/blob/main/.github/CODE_OF_CONDUCT.md/).