effectsize: Indices of Effect Size

library(effectsize)

options(digits = 3)

knitr::opts_chunk$set(
  collapse = TRUE,
  dpi = 450,
  fig.path = "man/figures/"
)

set.seed(111)

DOI downloads total status lifecycle

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 Cohen's d, r, odds-ratios, etc.

Installation

CRAN effectsize status badge R-CMD-check pkgdown Codecov test coverage

Run the following to install the stable release of effectsize from CRAN:

install.packages("effectsize")

Or you can install the latest development version from R-universe:

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

Documentation

Documentation Blog Features

Click on the buttons above to access the package documentation and the easystats blog, and check-out these vignettes:

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.

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 (Cohen's d, Hedges' g, Glass' delta)

cohens_d(mpg ~ am, data = mtcars)

hedges_g(mpg ~ am, data = mtcars)

glass_delta(mpg ~ am, data = mtcars)

effectsize also provides effect sizes for paired standardized differences, rank tests, common language effect sizes and more...

Contingency Tables

# Dependence
phi(mtcars$am, mtcars$vs)

cramers_v(mtcars$am, mtcars$cyl)

# Goodness-of-fit
fei(table(mtcars$cyl), p = c(0.1, 0.3, 0.6))

ANOVAs (Eta2, Omega2, ...)

model <- aov(mpg ~ factor(gear), data = mtcars)

eta_squared(model)

omega_squared(model)

epsilon_squared(model)

And more...

Effect Size Conversion

The package also provides ways of converting between different effect sizes.

d_to_r(d = 0.2)

oddsratio_to_riskratio(2.6, p0 = 0.4)

And for recovering effect sizes from test statistics.

F_to_d(15, df = 1, df_error = 60)

F_to_r(15, df = 1, df_error = 60)

F_to_eta2(15, df = 1, df_error = 60)

Effect Size Interpretation

The package allows for an automated interpretation of different indices.

interpret_r(r = 0.3)

Different sets of "rules of thumb" are implemented (guidelines are detailed here) and can be easily changed.

interpret_cohens_d(d = 0.45, rules = "cohen1988")

interpret_cohens_d(d = 0.45, rules = "gignac2016")

Citation

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

Corresponding BibTeX entry:

@Article{,
  title = {{e}ffectsize: Estimation of Effect Size Indices and Standardized Parameters},
  author = {Mattan S. Ben-Shachar and Daniel Lüdecke 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. Anyone wishing to contribute to the package by adding functions, features, or in another way, please follow this guide and our code of conduct.



easystats/effectsize documentation built on May 15, 2024, 9:58 p.m.