Learn R Programming

msd (version 0.3.1)

ims: Item Measures

Description

Estimates item measures assuming person measures are known and all persons use the same set of rating category thresholds.

Usage

ims(data, persons, thresholds, misfit = FALSE, minRating = NULL)

Arguments

data

a numeric matrix of ordinal rating scale data whose entries are integers with missing data set to NA. Rows are persons and columns are items. The ordinal rating scale is assumed to go from the smallest to largest integer in integer steps unless minRating is specified (see Details).

persons

a numeric vector of person measures with missing values set to NA. The length of persons must equal the number of rows in data.

thresholds

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

misfit

logical for calculating infit and outfit statistics. Default is FALSE.

minRating

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

Value

A list whose elements are:

item_measures

a vector of person measures for each person

item_std_errors

a vector of standard errors for the persons

infit_items

if misfit = TRUE, a vector of infit statistics for the items

outfit_items

if misfit = TRUE, a vector of outfit statistics for the items

Details

minRating must be specified if either the smallest or largest possible rating category is not in data (i.e., no person used one of the extreme rating categories). If minRating is specified, the ordinal rating scale is assumed to go from minRating to minRating + length(thresholds) in integer steps.

See Also

msd

Examples

Run this code
# NOT RUN {
# Simple example with randomly generated values and lowest rating category = 0.
d <- as.numeric(sample(0:4, 500, replace = TRUE))
dm <- matrix(d, nrow = 50, ncol = 10)
pm <- runif(50, -2, 2)
th <- sort(runif(4, -2, 2))
im <- ims(data = dm, persons = pm, thresholds = th, misfit = TRUE, minRating = 0)
# }

Run the code above in your browser using DataLab