simFCGDINA: Forced-choice data simulation based on the G-DINA model

View source: R/simFCGDINA.R

simFCGDINAR 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),
  FCCDM.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 numeric value indicating the sample size.

Q.items

A binary matrix of dimensions J statements x K attributes indicating what statements measure what attributes.

n.blocks

A numeric value indicating the number of forced-choice blocks.

polarity

A matrix of dimensions n.blocks x 2 indicating whether each statament in each block is direct (1) or inverse (-1). Default is a matrix full of 1 (i.e., all statements are direct).

att

A matrix of dimensions N individuals x K attributes indicating the attribute profile of each individual. Default is NULL, meaning that attribute profiles will be simulated based on the specifications listed on GDINA.args or FCDCM.args.

model

Use the G-DINA model ("GDINA") or the FC-DCM ("FCDCM") as the generating model. Default is "GDINA".

GDINA.args

A list of arguments used if model = "GDINA".

GS

A J statements x 2 matrix indicating the guessing and slip parameter of each statement. Default is NULL.

GS.items

Only used if GDINA.args$GS = NULL. A vector of length 2 indicating the minimum and maximum value for the random generation of guessing and slip parameters for each statement. Default is c(1/3, 1/3).

AC

A numeric value indicating the attribute correlations in line with the multivariate normal threshold model (Chiu et al., 2009). Default is 0.

AT

A numeric value indicating the attribute thresholds in line with the multivariate normal threshold model (Chiu et al., 2009). Default is 0.

seed

Random number generation seed. Default is NULL.

FCDCM.args

A list of arguments used if model = "FCDCM".

d0

A vector of length 2 indicating the minimum and maximum value for the baseline probability for each FC block (see Huang, 2023). Default is c(0.2, 0.2).

sd

A vector of length 2 indicating the minimum and maximum value for the statement utility parameters (see Huang, 2023). Default is c(0.15, 0.15).

a

A numeric value indicating the minimum and maximum discrimination parameter for the higher-order model. Default is c(0, 0).

b

A numeric value indicating the location parameter for the higher-order model. Default is 0.

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.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)


Pablo-Najera/cdmTools documentation built on April 14, 2025, 10:49 a.m.