Learn R Programming

classicaltest (version 0.7.5)

discrimination: Item discrimination

Description

Estimates item discrimination of a corrected matrix or data frame.

Usage

discrimination(x, wt = NULL, itemscores = NULL, administered = NULL)

Value

a list.

Arguments

x

a data frame or matrix of scored data.

wt

a vector with total weights. Default is NULL.

itemscores

a numeric vector indicating all the possible scores for all items. If NULL, possible scores 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.

Examples

Run this code
# No weights
ex <- correct(x = dichodata, key = dichokey, navalue = NA)
discrimination(ex)


# With weights
set.seed(1919)
wt <- sample(x = 1:4, size = nrow(dichodata), replace = TRUE)
discrimination(ex,wt = wt)

Run the code above in your browser using DataLab