expdata {msd}R Documentation

Expected Ratings Matrix

Description

Expected ratings matrix given item measures, person measures and ordered rating category thresholds.

Usage

expdata(items, persons, thresholds, minRating)

Arguments

items

a numeric vector of item measures with missing values set to NA.

persons

a numeric vector of person measures with missing values set to NA.

thresholds

a numeric vector of ordered rating category thresholds with no NA.

minRating

integer representing the smallest ordinal rating category (see Details).

Details

It is assumed that the set of ordinal rating categories consists of all integers from the lowest rating category specified by minRating to the highest rating category, which is minRating + length(thresholds).

Value

A numeric matrix of expected ratings.

Note

Expected ratings are literally the expected value of the ordinal rating categories when treated as integers. Expected ratings that cannot be calculated return as NA (e.g., if either the person or item measure is NA). Intended use is for chi-squared tests or for calculating infit and outfit statistics.

Author(s)

Chris Bradley (cbradley05@gmail.com)

See Also

misfit

Examples

# Using randomly generated values with minimum rating set to zero
im <- runif(20, -2, 2)
pm <- runif(50, -2, 2)
th <- sort(runif(5, -2, 2))
m <- expdata(items = im, persons = pm, thresholds = th, minRating = 0)

[Package msd version 0.3.1 Index]