test_RND | R Documentation |
Tabulate data and conduct the permutation test of significance for the Relative Norm Distance (RND; also known as Relative Euclidean Distance). This is an alternative method to Single-Category WEAT.
test_RND(
data,
T1,
A1,
A2,
use.pattern = FALSE,
labels = list(),
p.perm = TRUE,
p.nsim = 10000,
p.side = 2,
seed = NULL
)
data |
A |
T1 |
Target words of a single category (a vector of words or a pattern of regular expression). |
A1 , A2 |
Attribute words (a vector of words or a pattern of regular expression). Both must be specified. |
use.pattern |
Defaults to |
labels |
Labels for target and attribute concepts (a named |
p.perm |
Permutation test to get exact or approximate p value of the overall effect.
Defaults to |
p.nsim |
Number of samples for resampling in permutation test. Defaults to If |
p.side |
One-sided ( In Caliskan et al.'s (2017) article, they reported one-sided p value for WEAT. Here, I suggest reporting two-sided p value as a more conservative estimate. The users take the full responsibility for the choice.
|
seed |
Random seed for reproducible results of permutation test. Defaults to |
A list
object of new class rnd
:
words.valid
Valid (actually matched) words
words.not.found
Words not found
data.raw
A data.table
of (absolute and relative) norm distances
eff.label
Description for the difference between the two attribute concepts
eff.type
Effect type: RND
eff
Raw effect and p value (if p.perm=TRUE
)
eff.interpretation
Interpretation of the RND score
Download pre-trained word vectors data (.RData
):
https://psychbruce.github.io/WordVector_RData.pdf
Garg, N., Schiebinger, L., Jurafsky, D., & Zou, J. (2018). Word embeddings quantify 100 years of gender and ethnic stereotypes. Proceedings of the National Academy of Sciences, 115(16), E3635–E3644.
Bhatia, N., & Bhatia, S. (2021). Changes in gender stereotypes over time: A computational analysis. Psychology of Women Quarterly, 45(1), 106–125.
tab_similarity
dict_expand
dict_reliability
test_WEAT
rnd = test_RND(
demodata,
labels=list(T1="Occupation", A1="Male", A2="Female"),
T1=cc("
architect, boss, leader, engineer, CEO, officer, manager,
lawyer, scientist, doctor, psychologist, investigator,
consultant, programmer, teacher, clerk, counselor,
salesperson, therapist, psychotherapist, nurse"),
A1=cc("male, man, boy, brother, he, him, his, son"),
A2=cc("female, woman, girl, sister, she, her, hers, daughter"),
seed=1)
rnd
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.