| Title: | Warmth and Competence Detectors |
|---|---|
| Description: | 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>. |
| Authors: | Bushra Guenoun [aut, cre] (ORCID: <https://orcid.org/0000-0003-0975-1620>), Julian Zlatev [aut] (ORCID: <https://orcid.org/0000-0002-9427-9887>), Noah Greifer [ctb] (ORCID: <https://orcid.org/0000-0003-3067-7154>) |
| Maintainer: | Bushra Guenoun <[email protected]> |
| License: | AGPL (>= 3) |
| Version: | 0.1.5 |
| Built: | 2026-05-11 20:46:41 UTC |
| Source: | https://github.com/cran/warmthcompetence |
Assesses warmth and competence perceptions in self-presentational natural language. These functions each take an N-length vector of self-presentational text documents and N-length vector of document IDs and return a warmth/competence perception score that represents how much warmth/competence others attribute the individual who wrote the self-presentational text. The function also contains a metrics argument that enables users to also return the raw features used to assess warmth and competence perceptions. Methods are described here:https://github.com/bushraguenoun/warmthcompetence/tree/master/paper.
competence(text, ID = NULL, metrics = "scores") warmth(text, ID = NULL, metrics = "scores")competence(text, ID = NULL, metrics = "scores") warmth(text, ID = NULL, metrics = "scores")
text |
|
ID |
|
metrics |
|
Some features depend on Spacyr which must be installed separately in Python.
The default is to return a data frame with each row containing the document identifier and the warmth/competence score. Users can also customize what is returned through the metrics argument. If metrics = "features", then a data frame of warmth/competence features will be returned where each document is represented by a row. If metrics = "all", then both the warmth/competence scores and features will be returned in a data frame.
Benoit, K., Watanabe, K., Wang, H., Nulty, P., Obeng, A., Müller, S., & Matsuo, A. (2018). quanteda: An R package for the quantitative analysis of textual data. Journal of Open Source Software, 3(30), 774. doi:10.21105/joss.00774
Buchanan, E. M., Valentine, K. D., & Maxwell, N. (2018). The LAB: Linguistic Annotated Bibliography.
Rinker, T. W. (2018). lexicon: Lexicon Data version 1.2.1.
Rinker, T. W. (2021). sentimentr: Calculate Text Polarity Sentiment version 2.9.0.
Yeomans, M., Kantor, A., & Tingley, D. (2019). The politeness Package: Detecting Politeness in Natural Language. The R Journal, 10(2), 489. doi:10.32614/RJ-2018-079
data("example_data") warmth_scores <- warmth(example_data$bio, metrics = "all") example_data$warmth_predictions <- warmth_scores$warmth_predictions warmth_model1 <- lm(RA_warm_AVG ~ warmth_predictions, data = example_data) summary(warmth_model1) competence_scores <- competence(example_data$bio, metrics = "all") example_data$competence_predictions <- competence_scores$competence_predictions competence_model1 <- lm(RA_comp_AVG ~ competence_predictions, data = example_data) summary(competence_model1)data("example_data") warmth_scores <- warmth(example_data$bio, metrics = "all") example_data$warmth_predictions <- warmth_scores$warmth_predictions warmth_model1 <- lm(RA_warm_AVG ~ warmth_predictions, data = example_data) summary(warmth_model1) competence_scores <- competence(example_data$bio, metrics = "all") example_data$competence_predictions <- competence_scores$competence_predictions competence_model1 <- lm(RA_comp_AVG ~ competence_predictions, data = example_data) summary(competence_model1)
40 random bios from the vignette data. 20 bios were randomly selected from the competence condition and 20 bios were randomly selected from the warmth condition.
example_dataexample_data
A dataframe with 40 rows and 11 columns
Sample data from a study that can be used to test and explore the package. In this study, participants were asked to present themselves in either a warm or competent manner. Then, three judges blind to participant condition coded the introductions for warmth and competence.
vignette_datavignette_data
A dataframe with 393 rows and 11 columns