misfit: Infit and Outfit Statistics

Description Usage Arguments Details Value Author(s) Examples

View source: R/msd.R

Description

Calculates infit and outfit statistics for items and persons.

Usage

1
misfit(data, items, persons, thresholds, 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.

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. Default is NULL (see Details).

Details

minRating must be specified if either the smallest or largest possible rating category is not in data (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).

Value

A list whose elements are:

infit_items

a vector of infit statistics for the items

outfit_items

a vector of outfit statistics for the items

infit_persons

a vector of infit statistics for the persons

outfit_persons

a vector of outfit statistics for the persons

Author(s)

Chris Bradley (cbradley05@gmail.com)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Using randomly generated values
d <- as.numeric(sample(0:5, 500, replace = TRUE))
dm <- matrix(d, nrow = 50, ncol = 10)
im <- runif(10, -2, 2)
pm <- runif(50, -2, 2)
th <- sort(runif(5, -2, 2))
m <- misfit(data = dm, items = im, persons = pm, thresholds = th)

# If the lowest or highest rating category is not in \code{data}, specify \code{minRating}
dm[dm == 0] <- NA
m2 <- misfit(data = dm, items = im, persons = pm, thresholds = th, minRating = 0)

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

Related to misfit in msd...