Learn R Programming

catR (version 3.4)

genPolyMatrix: Item bank generation (polytomous models)

Description

This command generates an item bank from prespecified parent distributions for use with polytomous IRT models. Subgroups of items can also be specified for content balancing purposes.

Usage

genPolyMatrix(items = 100, nrCat = 3, model = "GRM", seed = 1, same.nrCat = FALSE,
 	cbControl = NULL)

Arguments

items
integer: the number of items to generate (default is 100).
nrCat
integer: the (maximum) number of response categories to generate (default is 3).
model
character: the type of polytomous IRT model. Possible values are "GRM" (default), "MGRM", "PCM", "GPCM" and "NRM". See Details.
seed
numeric: the random seed for item parameter generation (default is 1).
same.nrCat
logical: should all items have the same number of response categories? (default is FALSE. Ignored if model is either "MGRM" or "RSM". See Details.
cbControl
either a list of accurate format to control for content balancing, or NULL. See Details.

Value

  • A matrix with items rows and as many columns as required for the considered IRT model:
    • $\max_j \,g_j+1$columns, holding parameters$(\alpha_j, \beta_{j1}, ..., \beta_{j,g_j})$ifmodelis"GRM";
  • $g+2$ columns, holding parameters $(\alpha_j, b_j, c_1, ..., c_g)$ if model is "MGRM";
  • $\max_j \,g_j$ columns, holding parameters $(\delta_{j1}, ..., \delta_{j,g_j})$ if model is "PCM";
  • $\max_j \,g_j+1$ columns, holding parameters $(\alpha_j, \delta_{j1}, ..., \delta_{j,g_j})$ if model is "GPCM";
  • $g+1$ columns, holding parameters $(\lambda_j, \delta_1, ..., \delta_g)$ if model is "RSM";
  • $2\,\max_j\, g_j$ columns, holding parameters $(\alpha_{j1}, c_{j1}, \alpha_{j2}, c_{j2}, ..., \alpha_{j,g_j}, c_{j, g_j})$ if model is "NRM".

code

cbControl$props

eqn

$P_{jk}^*(\theta)$

deqn

$$P_{jk}(\theta)=\frac{\exp (\alpha_{jk}\,\theta+c_{jk})}{\sum_{r=0}^{g_j} \exp (\alpha_{jr}\,\theta+c_{jr})}\quad \mbox{with} \quad \alpha_{j0}\,\theta+c_{j0}=0.$$

bold

  • Details
  • Examples

Details

The genPolyMatrix permits to quickly generate a polytomous item bank in suitable format for further use in e.g. computing item response propbabilities with the Pi. The six polytomous IRT models that are supported are:
  1. theGraded Response Model(GRM; Samejima, 1969);
the Modified Graded Response Model (MGRM; Muraki, 1990); the Partial Credit Model (PCM; Masters, 1982); the Generalized Partial Credit Model (GPCM; Muraki, 1992); the Rating Scale Model (RSM; Andrich, 1978); the Nominal Response Model (NRM; Bock, 1972).

References

Andrich, D. (1978). A rating formulation for ordered response categories. Psychometrika, 43, 561-573. doi: 10.1007/BF02293814 Bock, R. D. (1972). Estimating item parameters and latent ability when responses are scored in two or more nominal categories. Psychometrika, 37, 29-51. doi: 10.1007/BF02291411 Embretson, S. E., and Reise, S. P. (2000). Item response theory for psychologists. Mahwah, NJ: Lawrence Erlbaum Associates. Magis, D., and Raiche, G. (2012). Random Generation of Response Patterns under Computerized Adaptive Testing with the R Package catR. Journal of Statistical Software, 48 (8), 1-31. URL http://www.jstatsoft.org/v48/i08/ Masters, G. N. (1982). A Rasch model for partial credit scoring. Psychometrika, 47, 149-174. doi: 10.1007/BF02296272 Muraki, E. (1990). Fitting a polytomous item response model to Likert-type data. Applied Psychological Measurement, 14, 59-71. doi: 10.1177/014662169001400106 Muraki, E. (1992). A generalized partial credit model: Application of an EM algorithm. Applied Psychological Measurement, 16, 19-176. doi: 10.1177/014662169201600206 Samejima, F. (1969). Estimation of latent ability using a response pattern of graded scores. Psychometrika Monograph (vol. 17).

See Also

Pi

Examples

Run this code
# All generated item banks have 10 items and at most four response categories

 # GRM 
 genPolyMatrix(10, 4, model = "GRM")

 # GRM with same number of response categories
 genPolyMatrix(10, 4, model = "GRM", same.nrCat = TRUE)

 # MGRM 
 genPolyMatrix(10, 4, model = "MGRM")

 # MGRM with same number of response categories
 genPolyMatrix(10, 4, model = "MGRM", same.nrCat = TRUE) # same result

 # PCM 
 genPolyMatrix(10, 4, model = "PCM")

 # PCM with same number of response categories
 genPolyMatrix(10, 4, model = "PCM", same.nrCat = TRUE) 

 # GPCM 
 genPolyMatrix(10, 4, model = "GPCM")

 # GPCM with same number of response categories
 genPolyMatrix(10, 4, model = "GPCM", same.nrCat = TRUE) 

 # RSM 
 genPolyMatrix(10, 4, model = "RSM")

 # RSM with same number of response categories
 genPolyMatrix(10, 4, model = "RSM", same.nrCat = TRUE) # same result

 # NRM 
 genPolyMatrix(10, 4, model = "NRM")

 # NRM with same number of response categories
 genPolyMatrix(10, 4, model = "NRM", same.nrCat = TRUE)  

## Content balancing

 # Creation of the 'cbList' list with arbitrary proportions
 cbList <- list(names = c("Audio1", "Audio2", "Written1", "Written2", "Written3"), 
        props = c(0.1, 0.2, 0.2, 0.2, 0.3))

 # NRM with 100 items
 genPolyMatrix(100, 4, model = "NRM", cbControl = cbList)

Run the code above in your browser using DataLab