simFCGDINA {cdmTools} | R Documentation |
Forced-choice data simulation based on the G-DINA model
Description
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).
Usage
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
)
Arguments
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 |
Value
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
).
Author(s)
Pablo Nájera, Universidad Pontificia Comillas
References
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
Examples
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)