genDichoMatrix: Item bank generation (dichotomous models)

View source: R/genDichoMatrix.R

genDichoMatrixR Documentation

Item bank generation (dichotomous models)

Description

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

Usage

genDichoMatrix(items = 100, cbControl = NULL, model = "4PL", 
  aPrior = c("norm", 1, 0.2), bPrior = c("norm", 0, 1), 
  cPrior = c("unif", 0, 0.25), dPrior = c("unif", 0.75, 1), seed = 1)
 

Arguments

items

integer: the number of items to include in the generated item bank.

cbControl

either a list to define subgroups for content balancing or NULL (default). See Details.

model

character: the name of the logistic IRT model, with possible values "1PL", "2PL", "3PL" or "4PL" (default).

aPrior

vector of three components, specifying the prior distribution and item parameters for generating the item discrimination levels. See Details.

bPrior

vector of three components, specifying the prior distribution and item parameters for generating the item difficulty levels. See Details.

cPrior

vector of three components, specifying the prior distribution and item parameters for generating the item lower asymptote levels. See Details.

dPrior

vector of three components, specifying the prior distribution and item parameters for generating the item upper asymptote levels. See Details.

seed

numeric: the random seed number for the generation of item parameters (default is 1). See set.seed for further details.

Details

This function permits to generate an item bank under dichotomous IRT models that is compatible for use with randomCAT.

The number of items to be included in the bank is specified by the items argument. Corresponding item parameters are drawn from distributions to be specified by arguments aPrior, bPrior, cPrior and dPrior for respective parameters a_i, b_i, c_i and d_i (Barton and Lord, 1981). Each of these arguments is of length 3, the first component containing the name of the distribution and the last two components coding the distribution parameters.

Possible distributions are:

  • the normal distribution N(μ, σ^2), available for parameters a_i and b_i. It is specified by "norm" as first argument while the latter two arguments contain the values of μ and σ respectively.

  • the log-normal distribution \log N(μ, σ^2), available for parameter a_i only. It is specified by "lnorm" as first argument while the latter two arguments contain the values of μ and σ respectively.

  • the uniform distribution U([a,b]), available for all parameters. It is specified by "unif" as first argument while the latter two arguments contain the values of a and b respectively. Note that taking a and b equal to a common value, say t, makes all parameters to be equal to t.

  • the Beta distribution Beta(α, β), available for parameters c_i and d_i. It is specified by "beta" as first argument while the latter two arguments contain the values of α and β respectively.

Inattention parameters d_i are fixed to 1 if model is not "4PL"; pseudo-guessing parameters c_i are fixed to zero if model is either "1PL" or "2PL"; and discrimination parameters a_i are fixed to 1 if model="1PL". The random generation of item parameters can be controlled by the seed argument.

If required, the distribution of the items across subgroups with specified names can be performed. To do so, the cbControl argument must be supplied with a list of two arguments: (a) the first argument is called $names and contains the different names of the subgroups of items; (b) the second argument is called $props and contains a vector of numeric values, of the same length of names element, with only positive numbers but not necessarily summing to one. For instance, if props is set as c(1, 2, 2) and items to 100, then the three subgroups will hold respectively 20, 40 and 40 items.

Several constraints apply to the arguments of the cbControl list. First, both arguments of cbControl must be of the same length. Second, as already explained, cbControl$props must either sum to 1 (in case of proportions) or to items (in case of integer values). Finally, if proportions are provided to cbControl$props, one can ensure that when multiplied by items they return integer values (so that they can sum up to items).

The random generation of item parameters and the random allocation of items to subgroups of items are both under control by the seed argument.

The output is a data frame with at least four arguments, with names a, b, c and d for respectively the discrimination a_i, the difficulty b_i, the lower asymptote c_i and the upper asymptote d_i parameters. A fifth argument contains optionally the subgroup names that have been randomly assigned to the generated items, in the proportions specified by the $props argument of the cbControl list.

Value

A data frame with four or five arguments:

a

the generated item discrimination parameters.

b

the generated item difficulty parameters.

c

the generated item lower asymptote parameters.

d

the generated item upper asymptote parameters.

Group

(optional) the distribution of subgroup names across items. Ignored if cbControl is NULL.

Note

The current version of genItemBank is only designed for dichotomous IRT models. Future extensions will hopefully provide the same tool for polytomous IRT models.

Author(s)

David Magis
Department of Psychology, University of Liege, Belgium
david.magis@uliege.be

References

Barton, M.A., and Lord, F.M. (1981). An upper asymptote for the three-parameter logistic item-response model. Research Bulletin 81-20. Princeton, NJ: Educational Testing Service.

Magis, D. and Barrada, J. R. (2017). Computerized Adaptive Testing with R: Recent Updates of the Package catR. Journal of Statistical Software, Code Snippets, 76(1), 1-18. doi: 10.18637/jss.v076.c01

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. doi: 10.18637/jss.v048.i08

See Also

nextItem, randomCAT

Examples


 # Item bank generation with 500 items
 genDichoMatrix(items = 500)

 # Item bank generation with 100 items, 2PL model and log-normal distribution with 
 # parameters (0, 0.1225) for discriminations
 genDichoMatrix(items = 100, model = "2PL", aPrior = c("lnorm", 0, 0.1225))

 # A completely identical method as for previous example
 genDichoMatrix(items = 100, aPrior = c("lnorm", 0, 0.1225), 
  cPrior = c("unif", 0, 0), dPrior = c("unif", 1, 1))

 # Item bank generation with prespecified content balancing control options 
 cbList <- list(names = c("Group1", "Group2", "Group3", "Group4"), 
        props = c(0.2,0.4,0.3,0.1))
 genDichoMatrix(items = 100, cbControl = cbList)

 # With proportions that do not sum to one
 cbList <- list(names = c("Group1", "Group2", "Group3", "Group4"), props=c(2, 4, 3, 1))
 genDichoMatrix(items = 100, cbControl = cbList)

 

catR documentation built on June 24, 2022, 9:06 a.m.

Related to genDichoMatrix in catR...