weat_es: Calculation of WEAT effect size

View source: R/sweater.R

weat_esR Documentation

Calculation of WEAT effect size

Description

This function calculates the effect size from a sweater object. The original implementation in Caliskan et al. (2017) assumes the numbers of words in S and in T must be equal. The current implementation eases this assumption by adjusting the variance with the difference in sample sizes. This adjustment works not so great when the length of S and T are short. It is also possible to convert the Cohen's d to Pearson's correlation coefficient (r). If possible, please use calculate_es() instead.

Usage

weat_es(x, standardize = TRUE, r = FALSE)

Arguments

x

an object from the weat function.

standardize

a boolean to denote whether to correct the difference by the standard division. The standardized version can be interpreted the same way as Cohen's d.

r

a boolean to denote whether convert the effect size to biserial correlation coefficient.

Value

the effect size of the query

References

Caliskan, A., Bryson, J. J., & Narayanan, A. (2017). Semantics derived automatically from language corpora contain human-like biases. Science, 356(6334), 183-186. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1126/science.aal4230")}

Examples

# Reproduce the number in Caliskan et al. (2017) - Table 1, "Math vs. Arts"
data(glove_math)
S1 <- c("math", "algebra", "geometry", "calculus", "equations",
"computation", "numbers", "addition")
T1 <- c("poetry", "art", "dance", "literature", "novel", "symphony", "drama", "sculpture")
A1 <- c("male", "man", "boy", "brother", "he", "him", "his", "son")
B1 <- c("female", "woman", "girl", "sister", "she", "her", "hers", "daughter")
sw <- weat(glove_math, S1, T1, A1, B1)
weat_es(sw)

chainsawriot/sweater documentation built on Nov. 12, 2023, 10:17 a.m.