Data generation and analysis modules for standardized questionnaire Product Emotion Measurement Instrument (Pieter Desmet, 2017), by amat-design.com.

Licence (non-commercial free with attribution): Delft Institute of Positive Design

PrEmo is made and owned by Laurans, G. & Desmet, P.M.A. (2017). Developing 14 animated characters for non‑verbal self‑report of categorical emotions. Journal of Design Research, 15 (3/4), 214–233.

Sources: https://diopd.org/premo/

Items

Illustrations available to select:

  1. Joy
  2. Admiration
  3. Pride
  4. Hope
  5. Satisfaction
  6. Fascination
  7. Desire
  8. Sadness
  9. Fear
  10. Shame
  11. Contempt
  12. Anger
  13. Boredom
  14. Disgust

Fourteen of Premo expressions. From Pieter Desmet, Peter Wassink, Emotion Studio (https://diopd.org/premo/)

In this notebook, each user can select up to 3 emotions.

Generate

n <- 200

Premo <- rep(0, n)

prob <- c(rep(0.7, 7), rep(0.3, 7))

for (i in 1:length(Premo)) {
  cn <- sample(1:3, 1)
  ch <- NULL
  ch <- c(ch, sample(1:14, cn, replace = F, prob = prob))
  Premo[i] <- toString(ch)
}

Premo <- data.frame("Selected"= Premo)

head(Premo)
##   Selected
## 1        6
## 2        2
## 3    14, 3
## 4       12
## 5        1
## 6        3

Transform

Premo.tr <- Premo

emotions <- c("Joy", "Admiration", "Pride", "Hope", "Satisfaction", "Fascination", "Desire", "Sadness", "Fear", "Shame", "Contempt", "Anger", "Boredom", "Disgust")

source <- Premo.tr$Selected

Binary <- list()

for (i in 1:14){
  len <- length(Binary)
  Binary[[len+1]] <- numeric(0)
}

names(Binary) <- paste(emotions, 1:14, sep = ".")

for (i in 1:14) {
  Binary[[i]] <- 
    regexpr(paste("^", as.character(i), "[[:punct:]]", sep = ""), source) != -1 | #begin w. character, followed by punct
    regexpr(paste("^", as.character(i), "$", sep = ""), source) != -1 | #begin w. character, ends after
    regexpr(paste("\\s", as.character(i), "$", sep = ""), source) != -1 | #begin w. space, ends after
    regexpr(paste("\\s", as.character(i), "[[:punct:]]", sep = ""), source) != -1 #begin w. space, followed by punct
}

Binary <- as.data.frame(Binary)

Premo.tr <- data.frame(Premo.tr, Binary)

head(Premo.tr)
##   Selected Joy.1 Admiration.2 Pride.3 Hope.4 Satisfaction.5 Fascination.6
## 1        6 FALSE        FALSE   FALSE  FALSE          FALSE          TRUE
## 2        2 FALSE         TRUE   FALSE  FALSE          FALSE         FALSE
## 3    14, 3 FALSE        FALSE    TRUE  FALSE          FALSE         FALSE
## 4       12 FALSE        FALSE   FALSE  FALSE          FALSE         FALSE
## 5        1  TRUE        FALSE   FALSE  FALSE          FALSE         FALSE
## 6        3 FALSE        FALSE    TRUE  FALSE          FALSE         FALSE
##   Desire.7 Sadness.8 Fear.9 Shame.10 Contempt.11 Anger.12 Boredom.13 Disgust.14
## 1    FALSE     FALSE  FALSE    FALSE       FALSE    FALSE      FALSE      FALSE
## 2    FALSE     FALSE  FALSE    FALSE       FALSE    FALSE      FALSE      FALSE
## 3    FALSE     FALSE  FALSE    FALSE       FALSE    FALSE      FALSE       TRUE
## 4    FALSE     FALSE  FALSE    FALSE       FALSE     TRUE      FALSE      FALSE
## 5    FALSE     FALSE  FALSE    FALSE       FALSE    FALSE      FALSE      FALSE
## 6    FALSE     FALSE  FALSE    FALSE       FALSE    FALSE      FALSE      FALSE

Infere

Premo.tr.bin <- as.matrix(Premo.tr[, c(2:15)])

xp <- sum(Premo.tr.bin[, c(1:7)])
y <- sum(Premo.tr.bin)

print("Proportion of positive emotions:")
## [1] "Proportion of positive emotions:"
round(xp/y, 2)
## [1] 0.67
print("Conf. int:")
## [1] "Conf. int:"
round(binom.test(xp, y)$conf.int, 2)
## [1] 0.62 0.72
## attr(,"conf.level")
## [1] 0.95
xn <- sum(Premo.tr.bin[, c(8:14)])

print("Proportion of negative emotions:")
## [1] "Proportion of negative emotions:"
round(xn/y, 2)
## [1] 0.33
print("Conf. int:")
## [1] "Conf. int:"
round(binom.test(xn, y)$conf.int, 2)
## [1] 0.28 0.38
## attr(,"conf.level")
## [1] 0.95

Visualize

Emo.sum <- c()

for (i in 1:ncol(Premo.tr.bin)) {
  Emo.sum[i] <- sum(Premo.tr.bin[, i])
}

Emo.distr <- data.frame("Sum" = Emo.sum, "Name" = emotions, "Valence" = c(rep("Positive", 7), rep("Negative", 7)))

if (!require(ggplot2)) install.packages("ggplot2")
## Loading required package: ggplot2
library(ggplot2)

ggplot(Emo.distr, aes(Sum, Name, fill = Valence)) +
  geom_col(alpha = 0.2) +
  geom_dotplot(binaxis = "y", stackdir = "center", binwidth = 0.75, color = "white") +
  scale_fill_brewer(palette = "Set2") +
  labs(title ="PrEmo counts", subtitle = "by valence", x = "Count", y = "Emotion")