Error in optim

627 views
Skip to first unread message

Emily

unread,
Aug 2, 2018, 6:04:47 PM8/2/18
to mirt-package
I tried to run the following mirt code 

    mirt( minDat, 1, itemtype = 'gpcm', pars = sv, D = 1.7)

and I got an error message

Error: Error in optim(p, fn = Mstep.LL, gr = Mstep.grad, method = "BFGS", control = control,  : 
  non-finite value supplied by optim 

What shall I do? 


Phil Chalmers

unread,
Aug 2, 2018, 11:15:01 PM8/2/18
to Emily Bo, mirt-package
You could try a more stable but slower optimizer, such as optimizer = 'nlminb'. Though I'm surprised this error occurred with the BFGS algorithm (in my experience it's quite stable; its cousin the L-BFGS-B, on the other hand, is sometimes a pain). Could you provide a reproducible example?

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.
For more options, visit https://groups.google.com/d/optout.

Yuanchao Emily Bo

unread,
Aug 3, 2018, 5:52:52 PM8/3/18
to rphilip....@gmail.com, mirt-p...@googlegroups.com
Thank you, Phil. 

i found the error in the code. Some of the slope parameters were set as NA so it caused the problem 
Reply all
Reply to author
Forward
0 new messages