5.2 Likelihood of an individual response vector

Let us assume we have \(J=5\) items in a test measuring \(K=2\) attributes and the Q-matrix is given below:

Code
Q <- matrix(c(1, 0, 1, 0, 0, 1, 0, 1, 1, 1), ncol = 2, byrow = TRUE)

Also assume that we have item responses from \(N=10\) students:

Code
y <- matrix(c(1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1,
    0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1,
    0, 1, 0, 1, 0, 1, 0, 1), ncol = 5, byrow = TRUE)