generate_data: Generate IRT Response Data (Internal)

View source: R/generate_data.R

generate_dataR Documentation

Generate IRT Response Data (Internal)

Description

Wraps mirt::simdata() to produce a response matrix from an irt_design specification. Handles the b-to-d parameterization translation and theta generation.

Usage

generate_data(design, n, seed = NULL, theta = NULL)

Arguments

design

An irt_design object.

n

Integer. Number of respondents.

seed

Optional integer. Random seed for reproducibility. If NULL, the current RNG state drives draws (used by the parallel dispatch path in irt_simulate() so future.apply's L'Ecuyer-CMRG substreams are not clobbered by an explicit set.seed() call).

theta

Optional numeric vector of length n. Pre-generated theta values. If NULL, theta is drawn from design$theta_dist.

Value

A numeric matrix with n rows and design$n_items columns.


irtsim documentation built on April 24, 2026, 1:07 a.m.