longitudinal IRT in mirt() to utilize using MHRM: Error in draw

48 views
Skip to first unread message

Philip Griffiths

unread,
Sep 3, 2020, 6:36:01 PM9/3/20
to mirt-package
Hi all,

I have tried to specify a longitudinal IRT model in mirt() (rather than bfactor() ) as this will allow me to use MRHM rather than quadrature, and eventually allow me to build in more time points (I hope).

Right now, my dataset has the following set up:
  • n=4003
  • 3 time points
  • 11 items
    • 4 on a 5-point scale 
    • 6 on a 3-point scale
    • 1 item on a 5-point scale which only uses responses 3,4,5
      • This item is highlighted in the model statement
I have written a model to feed into mirt() (see end of post). However, I keep getting the following message:
"Error in draw.thetas(theta0 = gtheta0[[g]], pars = pars[[g]], fulldata = Data$fulldata[[g]],  : 
  MH sampler failed. Model is likely unstable or may need better starting valuesFALSE".

To try an overcome this, I ran a model in bfactor() with low quadrature and used mod2values() to enter this as starting values using the "pars=" option. As such, I don't think that this error is down to "needing better starting values".

My question is - have I built my model incorrectly or do I need to remove/re specify/ recode the item with a restricted range? At the moment I have tried specifying all 4 (theoretical)  thresholds (which doesn't really make sense). I have also (as below) just specified d1 and d2 (i.e. the thresholds for the present data). I have not recoded or removed it yet.

model <- 'Time1 = 1-11
          Time2 = 12-22
          Time3 = 23-33
          Item01 = 1,12,23
          Item02 = 2,13,24
          Item03 = 3,14,25
          Item04 = 4,15,26
          Item05 = 5,16,27
          Item06 = 6,17,28
          Item07 = 7,18,29
          Item08 = 8,19,30
          Item09 = 9,20,31
          Item10 = 10,21,32
          Item11 = 11,22,33
          CONSTRAIN = (1,12,23, a1, a2, a3), 
                      (1,12,23, a4), 
                      (1,12,23, d1), 
                      (1,12,23, d2), 
                      (1,12,23, d3),
                      (1,12,23, d4),
                      (2,13,24, a1, a2, a3), 
                      (2,13,24, a5),
                      (2,13,24, d1),
                      (2,13,24, d2),
                      (3,14,25, a1, a2, a3), 
                      (3,14,25, a6),
                      (3,14,25, d1),
                      (3,14,25, d2),
                      (4,15,26, a1, a2, a3), 
                      (4,15,26, a7),
                      (4,15,26, d1),
                      (4,15,26, d2),
                      (4,15,26, d3),
                      (4,15,26, d4),
                      (5,16,27, a1, a2, a3), 
                      (5,16,27, a8), 
                      (5,16,27, d1), 
                      (5,16,27, d2), 
                      (6,17,28, a1, a2, a3), 
                      (6,17,28, a9),
                      (6,17,28, d1),
                      (6,17,28, d2),
                      (7,18,29, a1, a2, a3), 
                      (7,18,29, a10), 
                      (7,18,29, d1), 
                      (7,18,29, d2), 
                      (8,19,30, a1, a2, a3), 
                      (8,19,30, a11), 
                      (8,19,30, d1), 
                      (8,19,30, d2), 
                      (9,20,31, a1, a2, a3), 
                      (9,20,31, a12),
                      (9,20,31, d1),
                      (9,20,31, d2),
                      (9,20,31, d3),
                      (9,20,31, d4),
                      (10,21,32, a1, a2, a3), 
                      (10,21,32, a13, d1, d2), 
                      (10,21,32, d1), 
                      (10,21,32, d2), 
                      (11,22,33, a1, a2, a3),
                      (11,22,33, a14),
                      (11,22,33, d1),
                      (11,22,33, d2)
          COV = Time1*Time2*Time3, Time2*Time2, Time3*Time3
          MEAN = Time2, Time3'
model <- mirt.model(model)

starting_values <- mod2values(mod)

mirtmod <- mirt(NHATS_IRT, model = model, method = 'MHRM', itemtype='graded', pars = starting_values)

Philip Griffiths

unread,
Sep 4, 2020, 3:54:26 AM9/4/20
to mirt-package
I edited this to remove the troublesome item. In doing so I also realised a copy and paste error where I tried to constrain some slopes to some intercepts!

As such it now runs, but I do not know whether this is because of the removal of the troublesome item or because of the copy/paste error (or both). 

Once I have figured out the cause I will update this with revised and commented model code for posterity. Lorde knows I have observed so much from this group before being a member - there must be a hundred people out  there with similar issues.

thanks!
Pip

Reply all
Reply to author
Forward
0 new messages