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),
FCCDM.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
|
seed |
Random number generation seed. Default is |
FCDCM.args |
A
|
simFCGDINA
returns an object of class simFCGDINA
.
dat
Generated FC responses (matrix
).
att
Generated attribute profiles (matrix
).
Q
Generated Q-matrix of FC blocks (matrix
).
LCprob
Generated block response probabilities for each latent class (matrix
).
item.pairs
Statements used in each FC block (matrix
).
q_att
Attribute measured by each statement as used by Huang (2023) (matrix
).
q_sta
Relative position of each statement as used by Huang (2023) (matrix
).
simGDINA
Object of class simGDINA
(list
).
polarity
Polarity matrix indicating the direction of each statement in each block (matrix
).
GS
Generated 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.items <- do.call("rbind", replicate(5, diag(5), simplify = FALSE)) # Q-matrix for the unidimensional statements
GS <- cbind(runif(n = nrow(Q.items), min = 0.1, max = 0.3), runif(n = nrow(Q.items), min = 0.1, max = 0.3)) # Guessing and slip parameter for each statement
n.blocks <- 30 # Number of forced-choice blocks
polarity <- matrix(1, nrow = n.blocks, ncol = 2) # Block polarity (1 = direct statement; -1 = indirect statement)
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.