distractors {classicaltest}R Documentation

Distractor statistics

Description

Summarize the statistics for each category of each item.

Usage

distractors(
  x,
  key,
  wt = NULL,
  navalue = NA,
  itemcategories = NULL,
  administered = NULL
)

Arguments

x

a data frame or matrix.

key

a vector or a list indicating the keys to score the data. If answers can only be right or wrong use a vector. If partial credits are allowed, use a list where the first element contains the keys for full credits, and next elements contain progressively the partial credit information. If a test has a combination of full credit and partial credit items, leave the full credit items as NAs in the keys for partial credit.

wt

a vector with total weights. Default is NULL.

navalue

a single value indicating the score of NAs.

itemcategories

a vector indicating all the possible categories for all items. If NULL, possible categories will be derived from data.

administered

a logical matrix indicating which items were administered. The dimensions should be the same as x. If NULL all items are considered administered.

Value

a list.

Examples

# Full credit items
distractors(x = dichodata, key = dichokey)

# Partial credit items
distractors(x = partialdata, key = partialkey)


[Package classicaltest version 0.7.5 Index]