drm: Dichotomous Response Model Probabilities

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

View source: R/irtmodel.R

Description

This function computes the probability of correct answers for one or more items for a given set of theta values using the IRT 1PL, 2PL, and 3PL models.

Usage

1
drm(theta, a, b, g = NULL, D = 1)

Arguments

theta

A vector of ability values.

a

A vector of item discrimination (or slope) parameters.

b

A vector of item difficulty (or threshold) parameters.

g

A vector of item guessing parameters.

D

A scaling factor in IRT models to make the logistic function as close as possible to the normal ogive function (if set to 1.7). Default is 1.

Details

g does not need to be specified when the response probabilities of the 1PL and 2PL models are computed.

Value

This function returns a vector or matrix. When a matrix is returned, rows indicate theta values and columns represent items.

Author(s)

Hwanggyu Lim hglim83@gmail.com

See Also

plm

Examples

1
2
3
4
5
6
7
8
## when vectors are used for both theta values and item parameters (3PLM)
drm(c(-0.1, 0.0, 1.5), a=c(1, 2), b=c(0, 1), g=c(0.2, 0.1), D=1)

## when vectors are only used for item parameters (2PLM)
drm(0.0, a=c(1, 2), b=c(0, 1), D=1)

## when vectors are only used for theta values (3PLM)
drm(c(-0.1, 0.0, 1.5), a=1, b=1, g=0.2, D=1)

cswells1/MeasInv documentation built on Dec. 19, 2021, 7 p.m.