Learn R Programming

catR (version 3.4)

genDichoMatrix: 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.

Value

  • A data frame with four or five arguments:
  • athe generated item discrimination parameters.
  • bthe generated item difficulty parameters.
  • cthe generated item lower asymptote parameters.
  • dthe generated item upper asymptote parameters.
  • Group(optional) the distribution of subgroup names across items. Ignored if cbControl is NULL.

eqn

$d_i$

code

cbControl

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:
  • thenormal distribution$N(\mu, \sigma^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$\mu$and$\sigma$respectively.
the log-normal distribution $\log N(\mu, \sigma^2)$, available for parameter $a_i$ only. It is specified by "lnorm" as first argument while the latter two arguments contain the values of $\mu$ and $\sigma$ 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(\alpha, \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 $\alpha$ and $\beta$ respectively.

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 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/

See Also

nextItem, randomCAT

Examples

Run this code
# 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)

 # Wrong definition of proportions
 cbList <- list(names = c("Group1", "Group2", "Group3", "Group4"), props=c(2, 4, 3, 1))
 genDichoMatrix(items = 100, cbControl = cbList)

Run the code above in your browser using DataLab