This function scores a word recall task where respondents are given 1 for a correct recall and 0 for an incorrect recall. Missing values (NA) are retained as NA in the output.
Value
A numeric vector where:
1
: Correct recall.0
: Incorrect recall (based on specific codes).NA
: If the original value was missing, it remains NA.
Details
The function assigns a score of 1 for a correct word recall. Incorrect recall is determined by specific numeric codes (51 to 67, 96, 98, and 99) and assigned a score of 0. Any NA values in the input will remain NA in the output.
Examples
responses <- c(53, 62, 100, NA, 66)
score_recall(responses)
#> [1] 0 0 1 NA 0