keys_to_rules: Derive scoring rules from keys

View source: R/dexter.R

keys_to_rulesR Documentation

Derive scoring rules from keys

Description

For multiple choice items that will be scored as 0/1, derive the scoring rules from the keys to the correct responses

Usage

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

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.

Value

A data frame that can be used as input to start_new_project


dexter documentation built on May 25, 2022, 9:10 a.m.