pms: Person Measures

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

View source: R/msd.R

Description

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

Usage

1
pms(data, items, 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).

items

a numeric vector of item measures with missing values set to NA. The length of items must equal the number of columns 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).

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.

Value

A list whose elements are:

person_measures

a vector of person measures for each person

person_std_errors

a vector of standard errors for the persons

infit_persons

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

outfit_persons

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

Note

Person measures estimated with pms differ from those estimated with msd because pms assumes all persons use the same rating category thresholds while msd does not. Intended use of pms is with an anchored set of items and thresholds. Person measures that cannot be estimated will return as NA (e.g., if a person responds to all items with only the highest rating category, or with only the lowest rating category, that person's person measure cannot be estimated).

Author(s)

Chris Bradley (cbradley05@gmail.com)

See Also

msd

Examples

1
2
3
4
5
6
# Simple example with randomly generated values and lowest rating category = 0
d <- as.numeric(sample(0:4, 500, replace = TRUE))
dm <- matrix(d, nrow = 25, ncol = 20)
im <- runif(20, -2, 2)
th <- sort(runif(4, -2, 2))
pm <- pms(data = dm, items = im, thresholds = th, misfit = TRUE, minRating = 0)

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

Related to pms in msd...