Computes the WEFAT statistic from the paper. No standard error is currently computed.

wefat(items, vectors, x_name, a_name, b_name)

Arguments

items

information about the items, typically from cbn_get_items

vectors

a matrix of word vectors for all the study items, typically from cbn_get_item_vectors

x_name

twe name of the target word condition, e.g. "AndrogeynousNames" in WEFAT 2

a_name

the name of the first attribute, e.g. "MaleAttributes" in WEFAT 2

b_name

the name of the second attribute, e.g. "FemaleAttributes" in WEFAT 2

Value

a data frame with columns Word and S_wab, the value of the statistic.

Examples

its <- cbn_get_items("WEFAT", 2) vecs <- cbn_get_item_vectors("WEFAT", 2) wefs <- wefat(its, vecs, x_name = "AndrogynousNames", a_name = "MaleAttributes", b_name = "FemaleAttributes") props <- cbn_gender_name_stats[, c('name', 'proportion_male')] wefs_props <- merge(wefs, props, by.x = "Word", by.y = "name") cor.test(wefs_props$S_wab, wefs_props$proportion_male)
#> #> Pearson's product-moment correlation #> #> data: wefs_props$S_wab and wefs_props$proportion_male #> t = 11.67, df = 50, p-value = 6.937e-16 #> alternative hypothesis: true correlation is not equal to 0 #> 95 percent confidence interval: #> 0.7596398 0.9146643 #> sample estimates: #> cor #> 0.8552431 #>