PAM_categorise: PAM_categorise

Description Usage Arguments Details Value References Examples

View source: R/SL_tbl_trans.R

Description

Categorise Photographic Affect Meter (PAM) scores into 4 categories by either PAM Quadrant, Valence or Arousal (or multiple of these).

Usage

1
2
3
4
5
PAM_categorise(
  tab,
  pam_name = "picture_idx",
  types = c("quadrant", "valence", "arousal")
)

Arguments

tab

A data.frame (or tibble) with a column representing Photographic Affect Meter (PAM) score.

pam_name

Character. The name of the column representing PAM.

types

Character vector containing the categories, one or more of "quadrant", "valence" and "arousal" into which to code PAM scores.

Details

The 4 Quadrant categories are as follows: Quadrant 1: negative valence, low arousal. Quadrant 2: negative valence, high arousal. Quadrant 3: positive valence, low arousal. Quadrant 4: positive valence, high arousal.

Valence and arousal are traditionally scores from -2 to 2, measuring displeasure to pleasure, and state of activation respectively. However, here we map those scores to positive numbers so (-2,-1,1,2) -> (1,2,3,4).

Value

The data.frame (or tibble) tab with extra columns pam_q, pam_v, and pam_a for quadrant, valence and arousal respectively.

References

Pollak, J. P., Adams, P., & Gay, G. (2011, May). PAM: a photographic affect meter for frequent, in situ measurement of affect. In Proceedings of the SIGCHI conference on Human factors in computing systems (pp. 725-734). ACM.

Examples

1
2
3
4
5
6
7
d <- tempdir()
download_studentlife(location = d, url = "testdata")

tab <- load_SL_tibble(
  loc = d, schema = "EMA", table = "PAM", csv_nrows = 10)

PAM_categorise(tab)

studentlife documentation built on Nov. 1, 2020, 9:07 a.m.