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)

Arguments

keys

A data frame containing columns item_id, noptions, and key See details.

include_NA_rule

whether to add an option 'NA' (which is scored 0) to each item

Value

A data frame that can be used as input to start_new_project

Details

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.