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", or"GRM".- 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.- GRM
a(discrimination, positive numeric vector) of lengthn_itemsandb(threshold matrix,n_itemsrows byn_categories - 1columns).
- 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.