Define the data-generating model for an IRT simulation study. This captures decisions 1–3 from the Schroeders & Gnambs (2025) framework: dimensionality, item parameters, and item type.
Arguments
- model
Character string specifying the IRT model. One of
"1PL","2PL","3PL","GRM","PCM", or"GPCM". The canonical list is registered inget_model_config().- n_items
Positive integer. Number of items in the instrument.
- item_params
A named list of item parameters. Contents depend on
model:- 1PL
b(numeric vector of lengthn_items). Discrimination is fixed at 1 for all items and added automatically.- 2PL
a(discrimination, positive numeric vector or matrix) andb(difficulty, numeric vector), each of lengthn_items.- 3PL
a,b, andc(guessing parameter, numeric vector with values in[0, 1)), each of lengthn_items.- GRM
a(discrimination, positive numeric vector) of lengthn_itemsandb(threshold matrix,n_itemsrows byn_categories - 1columns; thresholds ordered within row).- PCM
a(numeric vector, all1— Rasch family) of lengthn_itemsandb(step matrix,n_itemsrows byn_categories - 1columns; steps NOT required to be ordered within row).- GPCM
a(positive numeric vector) of lengthn_itemsandb(step matrix, same shape as PCM; steps NOT required to be ordered within row).
See
irt_params_1pl(),irt_params_2pl(),irt_params_3pl(),irt_params_grm(),irt_params_pcm(), andirt_params_gpcm()for helpers that generateitem_paramslists matching each schema.- theta_dist
Either a character string (
"normal"or"uniform") or a function that takes a single argumentnand returns a numeric vector of lengthn. Defaults to"normal".- n_factors
Positive integer specifying the number of latent factors. Defaults to
1L. Currently onlyn_factors = 1is supported; multidimensional IRT (n_factors > 1) is planned for v0.4.0. Passing any value other than1raises an error rather than silently propagating an unsupported design to the estimator.
Value
An S3 object of class irt_design (a named list) with elements
model, n_items, item_params, theta_dist, and n_factors.
See also
irt_study() to add study conditions, irt_params_2pl() and
irt_params_grm() to generate item parameters.