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(\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.
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.