Hi Everyone,
I'm trying to fit a complementary log log version of the 2PL model (not sure if this has a name in the IRT literature). I've been using the createItem function to do so like so:
name <- 'cloglog'
par <- c(a = .5, b = 2)
est <- c(TRUE, TRUE)
P.cloglog <- function(par, Theta, ncat){
a <- par[1]
b <- par[2]
P1 <- 1 - exp(-exp(a*(Theta - b)))
cbind(1 - P1, P1)
}
clog <- createItem(name, par=par, est=est, P=P.cloglog)
m2 <- mirt(grammar_short, 1, "cloglog", customItems=list(cloglog=clog))
With some sets of starting values, the model converges immediately and I get a warning. With other starting values, the model converges after 2 or 3 iterations, but the fit is really poor. I've tried reducing the tolerance but that doesn't change anything. I don't have any problems when I use MIRT's in-built model types with this data set. I'm assuming there's an error with the code above somewhere, but can't find it. Does anybody see anything?
thanks!
Seamus