sim.data.FCGDINA: Simulate Forced-Choice GDINA Data

View source: R/sim.data.FCGDINA.R

sim.data.FCGDINAR Documentation

Simulate Forced-Choice GDINA Data

Description

Generates forced-choice response data from a cognitive diagnostic item model. The item-level model may be DINA, DINO, ACDM, or GDINA. The resulting statement endorsement probabilities are transformed into forced-choice response probabilities for "RANK", "MOLE", or "PICK" blocks using the same sequential Luce–Plackett mechanism used by sim.data.FCMIRT and sim.data.FCGGUM.

Usage

sim.data.FCGDINA(
  N.person = 1000,
  N.block = 10,
  I.block = 2,
  D = 3,
  model = "GDINA",
  fc.type = "RANK",
  control = NULL
)

Arguments

N.person

Number of persons.

N.block

Number of forced-choice blocks.

I.block

Number of items per block when control$block.items is not supplied. Must be at least 2.

D

Number of latent attributes. If control$Q.matrix is supplied, D is reset to ncol(control$Q.matrix).

model

CDM item model: "DINA", "DINO", "ACDM", or "GDINA".

fc.type

Forced-choice response type: "RANK", "MOLE", or "PICK". A scalar value is recycled to all blocks; a vector of length B may be supplied for mixed block formats.

control

Optional named list controlling the data-generating process. Supported entries are described below.

Value

An object of class "data.FCGDINA", a list containing:

data

N \times B character matrix of forced-choice responses, such as "1>3>2" for ranking blocks.

response

N \times B integer matrix of 1-based pattern indices matching patterns.

alpha

N \times D binary matrix of true latent attribute profiles.

gs

I \times 2 matrix of item probability bounds P0 and P1.

delta.list

List of true CDM delta vectors, one per statement.

design.matrix.list

List of CDM design matrices used to map delta parameters to item endorsement probabilities.

Q.matrix

I \times D Q-matrix.

block.items

List of statement indices per forced-choice block.

model

CDM item model used for simulation.

patterns

List of observed response-pattern matrices per block.

patterns.total

List of full-ranking pattern matrices per block.

prob.item

N \times I matrix of item-level endorsement probabilities for sampled persons.

prob.states

I \times 2^D matrix of item endorsement probabilities for every attribute pattern.

prob

N \times \sum_b P_b matrix of forced-choice response-pattern probabilities.

N.person, N.block, I.block, D, I.states, fc.type

Final data-generating dimensions and response type.

call, arguments

Matched call and effective simulation arguments.

Data-Generating Process

The simulation proceeds in four steps:

  1. Generate or validate the Q-matrix and forced-choice block structure.

  2. Generate latent attribute profiles \boldsymbol{\alpha}_n.

  3. Generate item-level CDM endorsement probabilities using guessing and slipping-style bounds P0 and P1; then recover the corresponding CDM delta parameters from the design matrix.

  4. Convert item endorsement probabilities into block-level forced-choice pattern probabilities and sample observed responses.

Attribute profiles can be generated from a higher-order latent trait model, a thresholded multivariate normal model, a uniform distribution over all attribute patterns, or supplied directly through control$alpha.

Control List

Q.matrix

Optional I \times D binary Q-matrix. If omitted, a Q-matrix is generated by sim.data.Q.CDM().

block.items

Optional list of item indices per block. If omitted, blocks are formed sequentially using N.block and I.block.

single

Logical passed to sim.data.Q.CDM() when Q.matrix is generated internally. Default TRUE.

alpha

Optional N \times D binary matrix of true attribute profiles. If supplied, latent attributes are not generated.

distribution

Latent attribute distribution when alpha is not supplied. Options are "horder" (default; alias "higher.order"), "mvnorm", and "uniform".

delta1, delta0, theta

Higher-order discrimination, threshold, and person trait values used when distribution = "horder". Defaults are generated from log-normal, normal, and standard normal distributions.

Corr, threshold

Correlation matrix and thresholds used when distribution = "mvnorm".

gs

Optional I \times 2 matrix with columns P0 and P1; P0 is the lower endorsement probability and P1 is the upper endorsement probability for each statement. Defaults are sampled from U(0, .2) and U(.8, 1).

mono.constraint

Logical; whether to enforce monotonic item probabilities for GDINA item generation. Default TRUE.

References

de la Torre, J. (2011). The generalized DINA model framework. Psychometrika, 76(2), 179–199. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s11336-011-9207-7")}

See Also

fit.FCGDINA, model.FCGDINA, sim.data.FCMIRT, sim.data.FCGGUM, sim.data.FCDCM

Examples

set.seed(123)
sim <- sim.data.FCGDINA(N.person = 20, N.block = 3, I.block = 2,
                        D = 2, model = "DINA", fc.type = "RANK")

str(sim$data)
head(sim$response)
head(sim$alpha)
sim$Q.matrix

# Mixed response formats across blocks.
sim.mix <- sim.data.FCGDINA(
  N.person = 12, N.block = 3, I.block = 3, D = 2,
  model = "GDINA", fc.type = c("RANK", "MOLE", "PICK")
)
vapply(sim.mix$patterns, nrow, integer(1))


ForceChoice documentation built on Sept. 13, 2026, 1:06 a.m.