expdata: Expected Ratings Matrix

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/msd.R

Description

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

Usage

1
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

1
2
3
4
5
# 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)

msd documentation built on March 4, 2021, 1:06 a.m.

Related to expdata in msd...