View source: R/sim.data.FCGDINA.R
| model.FCGDINA | R Documentation |
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.
model.FCGDINA(
alpha,
delta.list,
design.matrix.list,
Q.matrix,
patterns.total,
patterns,
prob.item = NULL
)
alpha |
|
delta.list |
List of per-item delta parameter vectors. The length must
equal |
design.matrix.list |
List of per-item CDM design matrices generated by
|
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. |
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.
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.
sim.data.FCGDINA,
compute_fcgdina_item_prob,
forced_choice_from_agree
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.