All Projects → easystats → Effectsize

easystats / Effectsize

Licence: gpl-3.0
🐉 Compute and work with indices of effect size and standardized parameters

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to Effectsize

Ut4x Converter
Helps converting old Unreal Tournament maps to new Unreal Tournament 4 game.
Stars: ✭ 46 (-68.49%)
Mutual labels:  conversion
Nb pdf template
A more accurate representation of jupyter notebooks when converting to pdfs.
Stars: ✭ 109 (-25.34%)
Mutual labels:  conversion
Exchanger
🏢 Currency exchange rates framework for PHP
Stars: ✭ 133 (-8.9%)
Mutual labels:  conversion
Delorean
Convert Task to Future, and Future to Task
Stars: ✭ 63 (-56.85%)
Mutual labels:  conversion
Snakecase
🐍🐍🐍 A systematic approach to parse strings and automate the conversion to snake_case, UpperCamelCase or any other case.
Stars: ✭ 104 (-28.77%)
Mutual labels:  conversion
Dataclass factory
Modern way to convert python dataclasses or other objects to and from more common types like dicts or json-like structures
Stars: ✭ 116 (-20.55%)
Mutual labels:  conversion
0xc
Easy base conversion in emacs
Stars: ✭ 42 (-71.23%)
Mutual labels:  conversion
Swiftrewriter
A Swift Package Manager console app and library to convert Objective-C code into Swift.
Stars: ✭ 140 (-4.11%)
Mutual labels:  conversion
Ec2 Spot Converter
A tool to convert AWS EC2 instances back and forth between On-Demand and Spot billing models.
Stars: ✭ 108 (-26.03%)
Mutual labels:  conversion
Calibre Kobo Driver
An extension of the existing KoboTouch driver provided with Calibre. This plugin allows modifying ePub files to enable extra Kobo features. I am providing code in the repository to you under an open source license. Because this is my personal repository, the license you receive to my code is from me and not my employer.
Stars: ✭ 129 (-11.64%)
Mutual labels:  conversion
Batch textures convert
🔁 Batch texture conversion to various render-friendly mip-mapped formats
Stars: ✭ 67 (-54.11%)
Mutual labels:  conversion
Timezone Support
Lightweight time zone support for your applications or other date libraries.
Stars: ✭ 90 (-38.36%)
Mutual labels:  conversion
Alltomp3
Node module to download and convert in MP3 with tags an online video
Stars: ✭ 120 (-17.81%)
Mutual labels:  conversion
Normalize country
Convert country names and codes to a standard.
Stars: ✭ 60 (-58.9%)
Mutual labels:  conversion
Hrconvert2
A self-hosted, drag-and-drop, & nosql file conversion server that supports 62x file formats.
Stars: ✭ 132 (-9.59%)
Mutual labels:  conversion
Darknet2caffe
Convert Darknet model to Caffe's
Stars: ✭ 46 (-68.49%)
Mutual labels:  conversion
Bioconvert
Bioconvert is a collaborative project to facilitate the interconversion of life science data from one format to another.
Stars: ✭ 112 (-23.29%)
Mutual labels:  conversion
Easyrs
Convenience RenderScript tools for processing common Android formats such as Bitmap and NV21.
Stars: ✭ 144 (-1.37%)
Mutual labels:  conversion
Typestat
Converts JavaScript to TypeScript and TypeScript to better TypeScript.
Stars: ✭ 136 (-6.85%)
Mutual labels:  conversion
Asm2c
Tool to convert DOS Assembly code to C code
Stars: ✭ 121 (-17.12%)
Mutual labels:  conversion

effectsize

DOI downloads total

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

CRAN R-check pkgdown Codecov test coverage

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

install.packages("effectsize")

Or this one to install the latest development version:

install.packages("remotes")
remotes::install_github("easystats/effectsize")

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)

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.
## - Bias corrected using Hedges and Olkin's method.

glass_delta(mpg ~ am, data = mtcars)
## Glass' delta |         95% CI
## -----------------------------
## -1.17        | [-2.01, -0.66]

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)
## Parameter    | Eta2 |       90% CI
## ----------------------------------
## factor(gear) | 0.43 | [0.18, 0.59]

omega_squared(model)
## Parameter    | Omega2 |       90% CI
## ------------------------------------
## factor(gear) |   0.38 | [0.14, 0.55]

epsilon_squared(model)
## Parameter    | Epsilon2 |       90% CI
## --------------------------------------
## factor(gear) |     0.39 | [0.14, 0.56]

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.

convert_d_to_r(d = 1)
## [1] 0.447

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) |       90% CI
## -----------------------------
## 0.20           | [0.07, 0.34]

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_d(d = 0.45, rules = "cohen1988")
## [1] "small"
## (Rules: cohen1988)

interpret_d(d = 0.45, rules = "gignac2016")
## [1] "moderate"
## (Rules: gignac2016)

Utilities

Data Standardization, Normalization, Scaling, and Rank-Transforming

Many indices of effect size stem out, or are related, to standardization. Thus, it is expected that effectsize provides functions to standardize data.

A standardization sets the mean and SD to 0 and 1:

library(parameters) # for describe_distribution

df <- standardize(attitude)
describe_distribution(df$rating)
##      Mean | SD |  IQR |         Range | Skewness | Kurtosis |  n | n_Missing
## ----------------------------------------------------------------------------
## -5.46e-16 |  1 | 1.29 | [-2.02, 1.67] |    -0.40 |    -0.49 | 30 |         0

Alternatively, normalization is similar to standardization in that it is a linear translation of the parameter space (i.e., it does not change the shape of the data distribution). However, it puts the values within a 0 - 1 range, which can be useful in cases where you want to compare or visualise data on the same scale.

df <- normalize(attitude)
describe_distribution(df$rating)
## Mean |   SD |  IQR |        Range | Skewness | Kurtosis |  n | n_Missing
## ------------------------------------------------------------------------
## 0.55 | 0.27 | 0.35 | [0.00, 1.00] |    -0.40 |    -0.49 | 30 |         0

This is a special case of a rescaling function, which can be used to rescale the data to an arbitrary new scale. Let’s change all numeric variables to “percentages”:

df <- change_scale(attitude, to = c(0, 100)) 
describe_distribution(df$rating)
##  Mean |    SD |   IQR |          Range | Skewness | Kurtosis |  n | n_Missing
## -----------------------------------------------------------------------------
## 54.74 | 27.05 | 35.00 | [0.00, 100.00] |    -0.40 |    -0.49 | 30 |         0

For some robust statistics, one might also want to transform the numeric values into ranks, which can be performed using the ranktransform() function.

ranktransform(c(1, 3, -2, 6, 6, 0.5))
## [1] 3.0 4.0 1.0 5.5 5.5 2.0

or signed-ranks:

ranktransform(c(1, 3, -2, 6, 6, 0.5), sign = TRUE)
## [1]  2.0  4.0 -3.0  5.5  5.5  1.0

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].