# \donttest{
# Generate example item response matrix
data <- matrix(rbinom(500, size = 1, prob = 0.5), ncol=10, nrow=50)
# For 1PL LSIRM
lsirm_result <- lsirm(data ~ lsirm1pl(spikenslab = FALSE, fixed_gamma = FALSE))
diagnostic(lsirm_result)
# For 2PL LSIRM
lsirm_result <- lsirm(data ~ lsirm2pl(spikenslab = FALSE, fixed_gamma = FALSE))
diagnostic(lsirm_result)
# For specific latent positions
diagnostic(lsirm_result, draw.item = list(z = matrix(c(1,1, 2,1, 1,2), ncol=2, byrow=TRUE),
w = matrix(c(1,1, 2,1), ncol=2, byrow=TRUE)))
# }
Run the code above in your browser using DataLab