dict_reliability {PsychWordVec}R Documentation

Reliability analysis and PCA of a dictionary.

Description

Reliability analysis (Cronbach's \alpha and average cosine similarity) and Principal Component Analysis (PCA) of a dictionary, with visualization of cosine similarities between words (ordered by the first principal component loading). Note that Cronbach's \alpha can be misleading when the number of items/words is large.

Usage

dict_reliability(
  data,
  words = NULL,
  pattern = NULL,
  alpha = TRUE,
  sort = TRUE,
  plot = TRUE,
  ...
)

Arguments

data

A wordvec (data.table) or embed (matrix), see data_wordvec_load.

words

[Option 1] Character string(s).

pattern

[Option 2] Regular expression (see str_subset). If neither words nor pattern are specified (i.e., both are NULL), then all words in the data will be extracted.

alpha

Estimate the Cronbach's \alpha? Defaults to TRUE. Note that this can be misleading and time-consuming when the number of items/words is large.

sort

Sort items by the first principal component loading (PC1)? Defaults to TRUE.

plot

Visualize the cosine similarities? Defaults to TRUE.

...

Other parameters passed to plot_similarity.

Value

A list object of new class reliability:

alpha

Cronbach's \alpha

eigen

Eigen values from PCA

pca

PCA (only 1 principal component)

pca.rotation

PCA with varimax rotation (if potential principal components > 1)

items

Item statistics

cos.sim.mat

A matrix of cosine similarities of all word pairs

cos.sim

Lower triangular part of the matrix of cosine similarities

Download

Download pre-trained word vectors data (.RData): https://psychbruce.github.io/WordVector_RData.pdf

References

Nicolas, G., Bai, X., & Fiske, S. T. (2021). Comprehensive stereotype content dictionaries using a semi-automated method. European Journal of Social Psychology, 51(1), 178–196.

See Also

cosine_similarity

pair_similarity

plot_similarity

tab_similarity

most_similar

dict_expand

Examples

d = as_embed(demodata, normalize=TRUE)

dict = dict_expand(d, "king")
dict_reliability(d, dict)

dict.cn = dict_expand(d, "China", threshold=0.65)
dict_reliability(d, dict.cn)

dict_reliability(d, c(dict, dict.cn))
# low-loading items should be removed


[Package PsychWordVec version 2023.9 Index]