| simFCGDINA | R Documentation |
Simulate forced-choice (FC) responses based on the G-DINA model (de la Torre, 2011) and the FC-DCM (Huang, 2023).
This function accommodates FC responses to the simGDINA function from the GDINA package (Ma & de la Torre, 2020).
simFCGDINA(
N,
Q.items,
n.blocks = NULL,
polarity = NULL,
att = NULL,
model = "GDINA",
GDINA.args = list(GS = NULL, GS.items = c(1/3, 1/3), AC = 0, AT = 0),
FCDCM.args = list(d0 = c(0.2, 0.2), sd = c(0.15, 0.15), a = c(0, 0), b = 0),
seed = NULL
)
N |
A |
Q.items |
A binary |
n.blocks |
A |
polarity |
A |
att |
A |
model |
Use the G-DINA model ( |
GDINA.args |
A
|
FCDCM.args |
A
|
seed |
Random number generation seed. Default is |
simFCGDINA returns an object of class simFCGDINA.
datGenerated FC responses (matrix).
attGenerated attribute profiles (matrix).
QGenerated Q-matrix of FC blocks (matrix).
LCprobGenerated block response probabilities for each latent class (matrix).
item.pairsStatements used in each FC block (matrix).
q_attAttribute measured by each statement as used by Huang (2023) (matrix).
q_staRelative position of each statement as used by Huang (2023) (matrix).
simGDINAObject of class simGDINA (list).
polarityPolarity matrix indicating the direction of each statement in each block (matrix).
GSGenerated guessing and slip parameter for each statement (matrix).
Pablo Nájera, Universidad Pontificia Comillas
Huang, H.-Y. (2023). Diagnostic Classification Model for Forced-Choice Items and Noncognitive Tests. Educational and Psychological Measurement, 83(1), 146-180. https://doi.org/10.1177/00131644211069906
Ma, W., & de la Torre, J. (2020). GDINA: An R package for cognitive diagnosis modeling. Journal of Statistical Software, 93(14). https://doi.org/10.18637/jss.v093.i14
library(GDINA)
set.seed(123)
# Q-matrix for the unidimensional statements
Q.items <- do.call("rbind", replicate(5, diag(5), simplify = FALSE))
# Guessing and slip
GS <- cbind(runif(n = nrow(Q.items), min = 0.1, max = 0.3),
runif(n = nrow(Q.items), min = 0.1, max = 0.3))
n.blocks <- 30 # Number of forced-choice blocks
# Block polarity (1 = direct statement; -1 = indirect statement)
polarity <- matrix(1, nrow = n.blocks, ncol = 2)
sim <- simFCGDINA(N = 1000, Q.items, n.blocks = n.blocks, polarity = polarity,
model = "GDINA", GDINA.args = list(GS = GS), seed = 123)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.