gen.itembank {cdcatR} | R Documentation |
Item bank generation
Description
This function can be used to generate an item bank. The user can provide a Q-matrix or create one defining a set of arguments. Item quality is sampled from a uniform distribution with mean = mean.IQ and range = range.IQ. Alternatively, it is possible to provide a matrix with the guessing and slip parameters (gs.param) or a list with the success probabilities of each latent group (catprob.parm). Item parameters are generated so that the monotonicity constraint is satisfied.
Usage
gen.itembank(
Q = NULL,
gen.Q = list(J = NULL, K = NULL, propK.J = NULL, nI = 1, minJ.K = 1, max.Kcor = 1),
mean.IQ = NULL,
range.IQ = NULL,
gs.parm = NULL,
catprob.parm = NULL,
model = "GDINA",
min.param = 0,
seed = NULL
)
Arguments
Q |
Numeric matrix of length J number of items x K number of atributes. Q-matrix |
gen.Q |
A list of arguments to generate a Q-matrix if |
mean.IQ |
Item discrimination (mean for the uniform distribution). mean.IQ = P(1) - P(0) (Sorrel et al., 2017; Najera et al., in press). Must be a scalar numeric between 0 and 1 |
range.IQ |
Item discrimination (range for the uniform distribution). Must be a scalar numeric between 0 and 1 |
gs.parm |
A matrix or data frame for guessing and slip parameters. The number of columns must be 2, where the first column represents the guessing parameters (or P(0)), and the second column represents slip parameters (or 1-P(1)) |
catprob.parm |
A list of success probabilities of each latent group for each non-zero category of each item. This argument requires to specify a Q-matrix in |
model |
A character vector of length J with one model for each item, or a single value to be used for all items. The possible options include |
min.param |
Scalar numeric. Minimum value for the delta parameter of the principal effects of each attribute. Only usable if |
seed |
Scalar numeric. A scalar to use with |
Value
gen.itembank
returns an object of class gen.itembank
.
- simQ
Generated Q-matrix (only if
gen.Q
arguments have been used)- simcatprob.parm
A list of success probabilities for each latent group in each item
- simdelta.parm
A list of delta parameters for each item
- check
A list that contains the mean.IQ and range.IQ for the item bank so that users can check whether these values match the expected results
- specifications
A list that contains all the specifications
References
Najera, P., Sorrel, M. A., de la Torre, J., & Abad, F. J. (2020). Improving robustness in Q-matrix validation using an iterative and dynamic procedure. Applied Psychological Measurement, 44, 431-446.
Sorrel, M. A., Abad, F. J., Olea, J., de la Torre, J., & Barrada, J. R. (2017). Inferential item-fit evaluation in cognitive diagnosis modeling. Applied Psychological Measurement, 41, 614-631.
Examples
####################################
# Example 1. #
# Generate item bank providing a #
# Q-matrix using the G-DINA model #
####################################
Q <- sim180GDINA$simQ
bank <- gen.itembank(Q = Q, mean.IQ = .70, range.IQ = .20, model = "GDINA")
####################################
# Example 2. #
# Generate item bank providing a #
# Q-matrix with gs.parm #
####################################
Q <- sim180GDINA$simQ
J <- nrow(Q)
gs <- data.frame(g = runif(J, 0.2, 0.4), s = runif(J, 0, 0.2))
bank <- gen.itembank(Q = Q, gs.parm = gs, model = "GDINA", min.param = 0.05)
####################################
# Example 3. #
# Generate item bank providing a #
# Q-matrix with catprob.parm #
####################################
Q <- sim180GDINA$simQ[c(1:5, 73:77, 127:131),]
catparm.list <- list(J1 = c(0.2, 0.8),
J2 = c(0.1, 0.7),
J3 = c(0.2, 0.9),
J4 = c(0.3, 0.9),
J5 = c(0.3, 0.8),
J6 = c(0.2, 0.4, 0.5, 0.8),
J7 = c(0.1, 0.7, 0.8, 0.9),
J8 = c(0.2, 0.3, 0.3, 0.7),
J9 = c(0.2, 0.4, 0.4, 0.6),
J10 = c(0.3, 0.5, 0.6, 0.9),
J11 = c(0.1, 0.3, 0.3, 0.5, 0.4, 0.5, 0.7, 0.8),
J12 = c(0.2, 0.6, 0.7, 0.6, 0.7, 0.8, 0.8, 0.9),
J13 = c(0.2, 0.6, 0.2, 0.3, 0.6, 0.7, 0.4, 0.9),
J14 = c(0.3, 0.4, 0.3, 0.5, 0.5, 0.6, 0.7, 0.9),
J15 = c(0.1, 0.1, 0.2, 0.1, 0.2, 0.3, 0.2, 0.8))
bank <- gen.itembank(Q = Q, catprob.parm = catparm.list)
####################################
# Example 4. #
# Generate item bank providing a #
# Q-matrix using multiple models #
####################################
Q <- sim180GDINA$simQ
K <- ncol(Q)
model <- sample(c("DINA", "DINO", "ACDM"), size = nrow(Q), replace = TRUE)
bank <- gen.itembank(Q = Q, mean.IQ = .70, range.IQ = .20, model = model)
####################################
# Example 5. #
# Generate item bank without #
# providing a Q-matrix (using #
# gen.Q arguments) #
####################################
bank <- gen.itembank(gen.Q = list(J = 150, K = 5, propK.J = c(0.4, 0.3, 0.2, 0.1),
nI = 3, minJ.K = 30, max.Kcor = 1),
mean.IQ = .80, range.IQ = .10, min.param = 0.1)