View source: R/sim.data.FCGDINA.R
| sim.data.FCGDINA | R Documentation |
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.
sim.data.FCGDINA(
N.person = 1000,
N.block = 10,
I.block = 2,
D = 3,
model = "GDINA",
fc.type = "RANK",
control = NULL
)
N.person |
Number of persons. |
N.block |
Number of forced-choice blocks. |
I.block |
Number of items per block when |
D |
Number of latent attributes. If |
model |
CDM item model: |
fc.type |
Forced-choice response type: |
control |
Optional named list controlling the data-generating process. Supported entries are described below. |
An object of class "data.FCGDINA", a list containing:
dataN \times B character matrix of forced-choice
responses, such as "1>3>2" for ranking blocks.
responseN \times B integer matrix of 1-based pattern
indices matching patterns.
alphaN \times D binary matrix of true latent
attribute profiles.
gsI \times 2 matrix of item probability bounds
P0 and P1.
delta.listList of true CDM delta vectors, one per statement.
design.matrix.listList of CDM design matrices used to map delta parameters to item endorsement probabilities.
Q.matrixI \times D Q-matrix.
block.itemsList of statement indices per forced-choice block.
modelCDM item model used for simulation.
patternsList of observed response-pattern matrices per block.
patterns.totalList of full-ranking pattern matrices per block.
prob.itemN \times I matrix of item-level endorsement
probabilities for sampled persons.
prob.statesI \times 2^D matrix of item endorsement
probabilities for every attribute pattern.
probN \times \sum_b P_b matrix of forced-choice
response-pattern probabilities.
N.person, N.block, I.block, D,
I.states, fc.typeFinal data-generating dimensions and response type.
call, argumentsMatched call and effective simulation arguments.
The simulation proceeds in four steps:
Generate or validate the Q-matrix and forced-choice block structure.
Generate latent attribute profiles \boldsymbol{\alpha}_n.
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.
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.
Q.matrixOptional I \times D binary Q-matrix. If
omitted, a Q-matrix is generated by sim.data.Q.CDM().
block.itemsOptional list of item indices per block. If
omitted, blocks are formed sequentially using N.block and
I.block.
singleLogical passed to sim.data.Q.CDM() when
Q.matrix is generated internally. Default TRUE.
alphaOptional N \times D binary matrix of true
attribute profiles. If supplied, latent attributes are not
generated.
distributionLatent attribute distribution when
alpha is not supplied. Options are "horder"
(default; alias "higher.order"), "mvnorm", and
"uniform".
delta1, delta0, thetaHigher-order
discrimination, threshold, and person trait values used when
distribution = "horder". Defaults are generated from
log-normal, normal, and standard normal distributions.
Corr, thresholdCorrelation matrix and thresholds
used when distribution = "mvnorm".
gsOptional 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.constraintLogical; whether to enforce monotonic item
probabilities for GDINA item generation. Default TRUE.
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")}
fit.FCGDINA, model.FCGDINA,
sim.data.FCMIRT, sim.data.FCGGUM,
sim.data.FCDCM
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.