Learn R Programming

⚠️There's a newer version (1.0.0) of this package.Take me there.

effectsize

Size does matter

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

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

install.packages("effectsize")

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

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

Documentation

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)

Effect Size Computation

Standardized Differences (Cohen’s d, Hedges’ g, Glass’ delta)

The package provides functions to compute indices of effect size.

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' delta |         95% CI
## -----------------------------
## -1.17        | [-1.93, -0.39]

effectsize also provides effect sizes for contingency tables, rank tests, and more…

ANOVAs (Eta2, Omega2, …)

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

eta_squared(model)
## # Effect Size for ANOVA
## 
## Parameter    | Eta2 |       95% CI
## ----------------------------------
## factor(gear) | 0.43 | [0.18, 1.00]
## 
## - One-sided CIs: upper bound fixed at (1).

omega_squared(model)
## # Effect Size for ANOVA
## 
## Parameter    | Omega2 |       95% CI
## ------------------------------------
## factor(gear) |   0.38 | [0.14, 1.00]
## 
## - One-sided CIs: upper bound fixed at (1).

epsilon_squared(model)
## # Effect Size for ANOVA
## 
## Parameter    | Epsilon2 |       95% CI
## --------------------------------------
## factor(gear) |     0.39 | [0.14, 1.00]
## 
## - One-sided CIs: upper bound fixed at (1).

And more…

Regression Models (Standardized Parameters)

Importantly, effectsize also provides advanced methods to compute standardized parameters for regression models.

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:

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

Effect Size Conversion

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

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.

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)
## Eta2 (partial) |       95% CI
## -----------------------------
## 0.20           | [0.07, 1.00]
## 
## - One-sided CIs: upper bound fixed at (1).

Effect Size Interpretation

The package allows for an automated interpretation of different indices.

interpret_r(r = 0.3)
## [1] "large"
## (Rules: funder2019)

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")
## [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, 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

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.

Copy Link

Version

Install

install.packages('effectsize')

Monthly Downloads

62,732

Version

0.5

License

GPL-3

Maintainer

Mattan S. Ben-Shachar

Last Published

October 4th, 2021

Functions in effectsize (0.5)

interpret_pd

Interpret Probability of Direction (pd)
interpret_r

Interpret correlation coefficient
eta_squared

Effect size for ANOVA
eta2_to_f2

Convert between ANOVA effect sizes
interpret_bf

Interpret Bayes Factor (BF)
interpret_rope

Interpret Bayesian diagnostic indices
interpret_r2

Interpret coefficient of determination (R2)
odds_to_probs

Convert between Odds and Probabilities
reexports

Objects exported from other packages
interpret

Generic function for interpretation
rank_biserial

Effect size for non-parametric (rank sum) tests
oddsratio_to_riskratio

Convert between Odds ratios and Risk ratios
phi

Effect size for contingency tables
interpret_cohens_d

Interpret standardized differences
d_to_common_language

Convert Standardized Mean Difference to Common Language Effect Sizes
plot.effectsize_table

Methods for effectsize tables
standardize_info

Get Standardization Information
standardize.default

Re-fit a model with standardized data
interpret_gfi

Interpret of indices of CFA / SEM goodness of fit
standardize_parameters

Parameters standardization
interpret_ess

Interpret Bayesian diagnostic indices
interpret_direction

Interpret direction
sd_pooled

Pooled Standard Deviation
interpret_icc

Interpret Intraclass Correlation Coefficient (ICC)
rules

Interpretation Grid
t_to_d

Convert test statistics (t, z, F) to effect sizes of differences (Cohen's d) or association (partial r)
interpret_cohens_g

Interpret Cohen's g
format_standardize

Transform a standardized vector into character
hardlyworking

Workers' salary and other information
interpret_oddsratio

Interpret Odds ratio
interpret_kendalls_w

Interpret Kendall's coefficient of concordance
interpret_vif

Interpret the Variance Inflation Factor (VIF)
interpret_omega_squared

Interpret ANOVA effect size
interpret_p

Interpret p-values
is_effectsize_name

Checks if character is of a supported effect size
effectsize_deprecated

Deprecated functions
effectsize_CIs

Confidence (Compatibility) Intervals
d_to_r

Convert between d, r and Odds ratio
effectsize

Effect Size
cohens_d

Effect size for differences
F_to_eta2

Convert test statistics (F, t) to indices of partial variance explained (partial Eta / Omega / Epsilon squared and Cohen's f)
chisq_to_phi

Conversion Chi-Squared to Phi or Cramer's V
equivalence_test.effectsize_table

Test for Practical Equivalence
es_info

List of effect size names