For multiple choice items that will be scored as 0/1, derive the scoring rules from the keys to the correct responses
keys_to_rules(keys, include_NA_rule = FALSE)
A data frame containing columns
key See details.
whether to add an option 'NA' (which is scored 0) to each item
A data frame that can be used as input to
This function might be useful in setting up the scoring rules when all items are multiple-choice and scored as 0/1.
The input data frame must contain the exact id of each item, the number of options, and the key. If the keys are all integers, it will be assumed that responses are coded as 1 through noptions. If they are all letters, it is assumed that responses are coded as A,B,C,... All other cases result in an error.