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 |
words |
[Option 1] Character string(s). |
pattern |
[Option 2] Regular expression (see |
alpha |
Estimate the Cronbach's |
sort |
Sort items by the first principal component loading (PC1)?
Defaults to |
plot |
Visualize the cosine similarities? Defaults to |
... |
Other parameters passed to |
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
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