set.seed(123)
K <- 3
I <- 20
N <- 500
IQ <- list(
P0 = runif(I, 0.0, 0.2),
P1 = runif(I, 0.8, 1.0)
)
Q <- sim.Q(K, I)
data <- sim.data(Q = Q, N = N, IQ = IQ, model = "GDINA", distribute = "horder")
CDM.obj <- CDM(data$dat, Q)
Q.i <- c(1, 0, 0)
Q.i.k <- c(1, 1, 0)
## Discuss whether there is a significant difference when
## the q-vector of the 2nd item in the Q-matrix is Q.i or Q.i.k.
Wald.test.obj <- Wald.test(CDM.obj, Q.i, Q.i.k, i=2)
print(Wald.test.obj)
Run the code above in your browser using DataLab