thresh: Rating Category Thresholds

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

View source: R/msd.R

Description

Estimates rating category thresholds for msd given rating scale data, item measures and person measures.

Usage

1
thresh(data, items, persons)

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 integer to the largest integer in data in integer steps.

items

a numeric vector of item measures with missing values set to NA (see Details).

persons

a numeric vector of person measures with missing values set to NA (see Details).

Details

The length of items must equal the number of columns in data and the length of persons must equal the number of rows in data. Neither items nor persons can consist of only NA.

Value

A list whose elements are:

thresholds

a vector of average rating category thresholds used by the persons when rating the items

threshold_std_errors

a vector of standard errors for the thresholds

Note

thresh is a special case of msd when item measures and person measures are known.

Author(s)

Chris Bradley (cbradley05@gmail.com)

See Also

msd

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Using randomly generated values
d <- as.numeric(sample(0:5, 1000, replace = TRUE))
m <- matrix(d, nrow = 50, ncol = 20)
im <- runif(20, -2, 2)
pm <- runif(50, -2, 2)
th1 <- thresh(m, items = im, persons = pm)

# Anchor first 10 item measures and first 10 person measures
im[11:length(im)] <- NA
pm[11:length(pm)] <- NA
th2 <- thresh(m, items = im, persons = pm)

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

Related to thresh in msd...