Jin and Wang (2014) via createItem()

80 views
Skip to first unread message

Martijn Schoenmakers

unread,
Oct 7, 2021, 4:17:08 AM10/7/21
to mirt-package
Hi all,

Recently I was trying to implement a model presented by Jin and Wang (2014) into mirt. The model accounts for extreme responding by running a PCM where every respondent gets a parameter w, which is multiplied with the threshold parameters. (link to article: https://scholar.google.nl/scholar?hl=en&as_sdt=0%2C5&as_vis=1&q=generalized+irt+models+for+extreme+response+style&btnG=

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)
    }
x <- createItem(name = name, par=par, est=est, P=P.4catJinWang)

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?

Thanks in advance,
Martijn

Phil Chalmers

unread,
Jan 16, 2023, 2:10:19 PM1/16/23
to Martijn Schoenmakers, mirt-package
I believe you can do this, but the setup will be quite clunky. What I would do in this case is

- Set up a customTheta input and estimate the model as a multidimensional IRT model with k=2 factors. One factor is intended to be the trait (Theta[,1], say) while the other column is independent to define the integration grid for w
- Define a custom prior distribution to define the associated marginalization of the integrals (in Jin and Wang they assume a log-normal for w)
- Re-write the createItem() code such that w <- Theta[,2], and carry forward in that respect to ensure it is properly vectorized
- Ensure that the proper variance terms are estimate for the random effects found in Theta

Not exactly elegant, of course, and could be error prone. Might be best to try this type of model in Stan as I can foresee issues during estimation which could cause the estimator to crash. 

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/8609f4f4-4b62-48dd-beb8-0a99c51322een%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages