Learn R Programming

msd (version 0.3.1)

expdata: 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).

Value

A numeric matrix of expected ratings.

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).

See Also

misfit

Examples

Run this code
# NOT RUN {
# 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)
# }

Run the code above in your browser using DataLab