model.FCGDINA: Compute FCGDINA forced-choice pattern probabilities

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

model.FCGDINAR Documentation

Compute FCGDINA forced-choice pattern probabilities

Description

Computes block-level forced-choice response probabilities from known attribute profiles and item-level CDM delta parameters. This is the deterministic probability engine used by sim.data.FCGDINA for response generation and is useful for checking a fitted or simulated FCGDINA parameterization.

Usage

model.FCGDINA(
  alpha,
  delta.list,
  design.matrix.list,
  Q.matrix,
  patterns.total,
  patterns,
  prob.item = NULL
)

Arguments

alpha

N \times D binary matrix of attribute profiles.

delta.list

List of per-item delta parameter vectors. The length must equal nrow(Q.matrix).

design.matrix.list

List of per-item CDM design matrices generated by get_design_matrix_cdm.

Q.matrix

I \times D binary Q-matrix.

patterns.total

List of full-ranking pattern matrices.

patterns

List of observed pattern matrices.

prob.item

Optional precomputed item endorsement-probability matrix. Supplying it avoids recomputation in simulation workflows.

Details

Item endorsement probabilities are first computed by compute_fcgdina_item_prob. For person n and statement i, the probability is

p_{ni} = \mathbf{x}_i(\boldsymbol{\alpha}_n)' \boldsymbol{\delta}_i,

where \mathbf{x}_i(\boldsymbol{\alpha}_n) is the relevant row of the item CDM design matrix. The item probabilities are then converted to block-level forced-choice pattern probabilities by forced_choice_from_agree.

Value

An N \times \sum_b P_b matrix of forced-choice response probabilities, where P_b is the number of observable patterns in block b.

See Also

sim.data.FCGDINA, compute_fcgdina_item_prob, forced_choice_from_agree

Examples

sim <- sim.data.FCGDINA(N.person = 10, N.block = 2, I.block = 2,
                        D = 2, model = "DINA")
prob <- model.FCGDINA(
  alpha = sim$alpha,
  delta.list = sim$delta.list,
  design.matrix.list = sim$design.matrix.list,
  Q.matrix = sim$Q.matrix,
  patterns.total = sim$patterns.total,
  patterns = sim$patterns
)
stopifnot(all(abs(rowSums(prob) - length(sim$block.items)) < 1e-8))


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