Exclude participants who fail too many catch trials
filter_failed_catch.RdCatch trials present the target image as one of the two choices; a correct
response requires selecting the choice that matches the target. This
function removes any participant whose proportion of incorrect catch-trial
responses exceeds max_prop_wrong.
Details
A catch trial is identified by head == winner (correct response) or
head == loser (incorrect response). Only rows that satisfy one of
these conditions contribute to the catch-trial counts; other trial types
are ignored.
Examples
if (FALSE) { # \dontrun{
d <- data.frame(
worker_id = rep(c("p1", "p2"), each = 5),
head = c("cat","cat","dog","dog","cat", "bird","bird","fish","fish","bird"),
winner = c("cat","dog","cat","dog","fox", "bird","crow","fish","tuna","crow"),
loser = c("dog","cat","dog","cat","bear", "crow","bird","tuna","fish","bird")
)
filter_failed_catch(d, max_prop_wrong = 0.4)
} # }