createItem Function

32 views
Skip to first unread message

Seamus Donnelly

unread,
Sep 13, 2021, 10:38:43 AM9/13/21
to mirt-package
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


Phil Chalmers

unread,
Sep 20, 2021, 1:59:22 PM9/20/21
to Seamus Donnelly, mirt-package
Interesting, I don't see any obvious reason why this would be occurring. Could you provide a reproducible example of this behaviour (you don't have to post it publicly; a personal email for this type of report is fine). Cheers.

Phil


--
You received this message because you are subscribed to the Google Groups "mirt-package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mirt-package...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mirt-package/e712bf34-e7f7-4e0a-953f-21f061e65f63n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages