I tried implementing this model (for the special case of 4 item categories) into mirt using the createitem function, but I get stuck on how to add the additional person parameter w. So far, what I got in R is:
name <- '4catJinWang'
par <- c(d1 = 0, d2 = 0, d3 = 0)
est <- c(TRUE, TRUE, TRUE)
P.4catJinWang <- function(par, Theta, ncat = 4){
d1 <- par[1]
d2 <- par[2]
d3 <- par[3]
P0 <- 1/(1+sum(exp(Theta - (w * d1)), exp(sum(Theta- (w * d1), Theta- (w*d2))),
exp(sum(Theta-(w*d1), Theta-(w*d2), Theta - (w*d3)))))
P1 <- exp(Theta-(w*d1)) /(1+sum(exp(Theta - (w*d1)), exp(sum(Theta-(w*d1), Theta-(w*d2))),
exp(sum(Theta-(w*d1), Theta-(w*d2), Theta - (w*d3)))))
P2 <- exp(sum(Theta-(w*d1), Theta-(w*d2))) /(1+sum(exp(Theta - (w*d1)), exp(sum(Theta-(w*d1), Theta-(w*d2))),
exp(sum(Theta-(w*d1), Theta-(w*d2), Theta - (w*d3)))))
P3 <- exp(sum(Theta-(w*d1), Theta-(w*d2), Theta - (w*d3))) /
(1+sum(exp(Theta - (w*d1)), exp(sum(Theta-(w*d1), Theta-(w*d2))),
exp(sum(Theta-(w*d1), Theta-(w*d2), Theta - (w*d3)))))
cbind(P0, P1, P2, P3)
}
I know I could add w to par, but this makes mirt estimate it as an item parameter. Instead, I would like to estimate it as a person parameter (akin to theta). Is there any way this is possible in mirt?