Detects perceptions of warmth and competence in American English self-presentation language. Using trained elastic net regression models, this package provides a numerical representation of warmth and competence perceptions. Methods are described here:< https://github.com/bushraguenoun/warmthcompetence/tree/master/paper>.
Warmth and competence are the two main dimensions of social perception and judgment (Cuddy, Fiske, and Glick 2008) . When individuals introduce or describe themselves, their audiences automatically make judgments about their warmth and competence. In the warmthcompetence package, we provide tools that estimate warmth and competence social perceptions from natural self-presentational language. We use trained elastic net regression models to provide numerical representations of warmth and competence perceptions.
To generate a bibliographic reference for the package, run:
citation("warmthcompetence")
To install warmthcompetence from CRAN, use the following code in your R session:
install.packages("warmthcompetence")
To install the development version from GitHub, use the following code:
devtools::install_github("bushraguenoun/warmthcompetence")
Note that some features depend on spacyr which must be installed separately through Python. To install spacyr, follow the instructions here.
warmthcompetence contains two main functions: warmth() and
competence(). These functions can be used as described below:
competence_scores <- competence(text_vector, ID_vector, metrics = "scores")
warmth_scores <- warmth(text_vector, ID_vector, metrics = "scores")
In the code above, text_vector is the vector of texts that will be
assessed for warmth or competence. ID_vector is a vector of IDs that
will be used to identify the warmth or competence scores. The metrics
argument allows users to decide what metrics to return. Users can return
the warmth or competence scores (metrics = "scores"), the features
that underlie the warmth or competence scores (metrics = "features"),
or both the warmth or competence scores and the features
(metrics = "all"). The default choice is to return the warmth or
competence scores.
See vignette("warmthcompetence") for more details.
If you have any questions or encounter any problems with the package, please submit an issue through Github.
You can also contact me directly at [email protected].
Cuddy, Amy J. C., Susan T. Fiske, and Peter Glick. 2008. “Warmth and Competence as Universal Dimensions of Social Perception: The Stereotype Content Model and the BIAS Map.” In Advances in Experimental Social Psychology, 40:61–149. Elsevier. https://doi.org/10.1016/S0065-2601(07)00002-0.