I'm running into a wall on a task. I want to generate data for five items (each of which has 3 categories [0, 1, 2]), using fixed slope and parameter estimates, and then analyze the data with the graded-response model. I can't figure out what I'm doing wrong and what to do next. Here is some of the information I am working with. Any help with this?
# Items = 5
Categs = 3
Model = graded
Slope = (0.5, 1.0, 1.5, 2.0, 2.5)
Int#1 = (0.5, 0.8, 0.9, 0.8, 0.5)
Int#2 = (-0.1, -0.4, -0.9, -1.6, -2.5)
# Obs = 1000
Theta = -6 to 6
My code so far looks like this (admittedly, a bit of a mess). I'm very new to irt with R (mirt), so patience much appreciated!
set.seed(1234)
nitem <- 5
a <- matrix(c(0.5, 1, 1.5, 2, 2.5))
d <- matrix(c(0.5, 0.8, 0.9, 0.8, 0.5), 32, 5)
c <- seq(-6, 6, length.out = 32)
Group <- expand.grid( rep( list(0:2), nitem)) [, nitem:1]
N <- c(41, 11, 11, 11, 29, 5, 8, 22, 31, 10, 13, 21, 34, 15, 26, 84, 47, 7, 15, 12, 29, 14, 17, 53, 41, 11, 17, 38, 26, 36, 42, 223)
CData4 <- Group[rep(1:2^nitem, N), ]
mod1 <- mirt(CData4, 1, itemtype = "graded", SE = T)
data <- simdata(a, d + c, 1000, itemtype = rep("graded", 32))