A response definition controls how aggregate_looks() works.

create_response_def(
  primary,
  others,
  elsewhere = NULL,
  missing = NA,
  label = NULL
)

Arguments

primary

the primary response of interest

others

other responses of interest

elsewhere

responses to ignore

missing

responses that indicate missing data. Defaults to NA.

label

optional label for the response definition. Defaults to the value of primary.

Value

a response_def object

Details

To deal with eyetracking data in a generic way, we need a way to describe eyetracking responses. We assume that there are four basic gaze types.

  • Primary responses: A gaze to a primary or target image.

  • Other responses: Gazes to competing images.

  • Elsewhere looks: A gaze that is onscreen but not a primary or other response. Typically, this occurs when the participant is shifting between images.

  • Missing looks: A missing or offscreen gaze.

A response definition is a programmatic way of describing these response types, and it allows aggregate_looks() to map gaze data onto looking counts.

Examples

create_response_def( label = "looks to target", primary = "Target", others = c("PhonologicalFoil", "SemanticFoil", "Unrelated"), elsewhere = "tracked", missing = NA)
#> List of 5 #> $ response_def: chr "looks to target" #> $ primary : chr "Target" #> $ others : chr [1:3] "PhonologicalFoil" "SemanticFoil" "Unrelated" #> $ elsewhere : chr "tracked" #> $ missing : logi NA #> - attr(*, "class")= chr "response_def"