wefat: Compute the Paper's WEFAT statistic

Description Usage Arguments Value Examples

Description

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

Usage

1
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

1
2
3
4
5
6
7
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)

conjugateprior/cbn documentation built on June 26, 2019, 2:28 p.m.