CRTlong {reflectR} | R Documentation |
Automatic coding for Cognitive Reflection Test LONG (Primi et al., 2016) open-ended responses
Description
Applies coding logic to any number of provided CRT question responses and supports multiple coding schemes. This function can output original coded responses, binary-coded responses, and aggregate scores based on these binary codings.
Usage
CRTlong(
item1 = NULL,
item2 = NULL,
item3 = NULL,
item4 = NULL,
item5 = NULL,
item6 = NULL,
codingscheme = "categ",
na.rm = TRUE
)
Arguments
item1 |
Vector of responses to the first CRT question, or NULL if not provided. |
item2 |
Vector of responses to the second CRT question, or NULL if not provided. |
item3 |
Vector of responses to the third CRT question, or NULL if not provided. |
item4 |
Vector of responses to the fourth CRT question, or NULL if not provided. |
item5 |
Vector of responses to the fifth CRT question, or NULL if not provided. |
item6 |
Vector of responses to the sixth CRT question, or NULL if not provided. |
codingscheme |
A character string indicating the desired coding scheme. Options are "categ" for the original 1, 2, 3 coding, "sum" for a sum of binary-coded correct answers, or "mean" for an average of binary-coded correct answers. The default is "categ". |
na.rm |
Logical, indicating whether to treat missing values as empty responses or preserve them as missing information. When TRUE, NAs are coded as "other" incorrect responses; when FALSE, NAs are preserved. Default is TRUE. |
Value
A list containing the coded and, if applicable, binary-coded responses for each provided CRT question. For "sum" or "mean" coding schemes, additional vectors representing these aggregate scores are included.
Note
Developed by Giuseppe Corbelli, email: giuseppe.corbelli@uninettunouniversity.net, giuseppe.corbelli@uniroma1.it
Examples
# Automated scoring for CRTlong responses using the categorical coding scheme:
reflectR::CRTlong(
item1 = c("five", "5 cents", "10"),
item2 = c("5", "one hundred", "100"),
item3 = c("47", "24", "forty seven"),
item4 = c("3 elves", "dunno", "six"),
item5 = c(NA, "thirty", "30"),
item6 = c("15", "fifteen", "0"),
codingscheme = "categ",
na.rm = TRUE)
# Compute the sum score for CRTlong responses based on binary-coded correctness:
reflectR::CRTlong(
item1 = c("five", "5 cents", "10"),
item2 = c("5", "one hundred", "100"),
item3 = c("47", "24", "forty seven"),
item4 = c("3 elves", "dunno", "six"),
item5 = c(NA, "thirty", "30"),
item6 = c("15", "fifteen", "0"),
codingscheme = "sum",
na.rm = FALSE)$crt_sum