calcprob: calculates item response probabilities

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

View source: R/calcprob.R


Calculates item response probabilities over a theta grid according to either the GRM or the GPCM.


  calcprob(ipar, theta, model = "GRM")



a data frame containing the following columns: a, cb1, cb2,..., cb(maxCat-1)


a grid of theta values, e.g., theta <- seq(-4,4,.1)


IRT model, either "GRM" or "GPCM"


Calculates an array of item response probabilities according to either the Graded Response Model (GRM: Samejima, 1969) or the Generalized Partial Credit Model (GPCM: Muraki, 1992) over a grid of theta values. The two required input objects are ipar and theta. ipar is a data frame containing item parameters in the following order: a, cb1, cb2,..., cb(maxCat-1). Items may have different numbers of categories. The variable maxCAT is the maximum number of response categories across all items. theta is a vector containing a grid of theta values. The IRT model can be either "GRM" or "GPCM".


Returns an array of item response probabilities of dimension, c(nq, ni, maxCAT-1), where nq is the length of the theta grid, ni is the number of items in ipar, i.e., nrow(ipar), and maxCAT is the maximum number of response categories across all items.


Seung W. Choi <[email protected]>


Samejima, F. (1969). Estimation of latent ability using a response pattern of graded scores. Psychometrika Monograph, 17.

Muraki, E. (1992). A generalized partial credit model: Application of an EM algorithm. Applied Psychological Measurement, 16, 159-176.

See Also

probgrm, probgpcm


##theta <- seq(-4,4,.1)
## Not run: calcprob(item.par,theta,model="GPCM")

Example output

Loading required package: mirt
Loading required package: stats4
Loading required package: lattice
Loading required package: rms
Loading required package: Hmisc
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2

Attaching package: 'Hmisc'

The following objects are masked from 'package:base':

    format.pval, round.POSIXt, trunc.POSIXt, units

Loading required package: SparseM

Attaching package: 'SparseM'

The following object is masked from 'package:base':


lordif documentation built on May 30, 2017, 5:24 a.m.