ltm model doesn't convege

62 views
Skip to first unread message

Alaa

unread,
Jul 5, 2023, 8:52:46 AM7/5/23
to mirt-package
Hi,

I want to create a 2PL model for an MCQ item test. The data contains 82 item columns and 192 rows, with 0 OR 1 responses. I used ltm package in R. This was the code:

IRT_nonword_model <- ltm(IRT_nonword_df ~ z1, IRT.param = TRUE,
                         control = list(GHk = 20, iter.em = 20))

However, I kept getting error messages before and after I added the control. This is the error message: 

"Error in solve.default(object$hessian) : system is computationally singular: reciprocal condition number = 3.87811e-21"

Admittedly the dataset contains a lot of 0 compared to 1 because the items are pseudowords that were included in the test to penalize guessing.

Could you please suggest a way to overcome this issue?

I would appreciate your help a lot!

Many thanks,
Alaa

Phil Chalmers

unread,
Jul 5, 2023, 9:57:05 AM7/5/23
to Alaa, mirt-package
I'd recommend using mirt instead of ltm --- at least while I'm still moderating the mirt-package Google forum....

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/2c4c728b-f010-44b6-a290-2d57aedb8a44n%40googlegroups.com.

Alaa

unread,
Jul 6, 2023, 1:59:59 AM7/6/23
to mirt-package
Thank you phil for your recommendation! I used this code using the mirt package:

IRT_nonword_model_mirt <- mirt(IRT_nonword_df,
                               1,
                               itemtype = "2PL")


Thankfully, the model converged!

Alaa

unread,
Jul 8, 2023, 3:41:09 PM7/8/23
to mirt-package
One final question. I created mirt and ltm models for the same data but got considerably different difficulty parameters. Here is an example comparing parameters from the two models: 


IRT_word_models.png

Why do we have a positive difficulty parameter in mirt model but a negative one in ltm for the same item (e.g., item1, item 2)? Is it because mirt assigns a positive value to indicate higher difficulty, while ltm generates a negative value to indicate higher difficulty? 

Your response would be much appreciated. 

Many thanks,
Alaa

Phil Chalmers

unread,
Jul 8, 2023, 9:36:46 PM7/8/23
to Alaa, mirt-package
mirt uses slope-intercept parameterizations. Try using coef(your_model, IRTpars=TRUE).

Phil


Alaa

unread,
Jul 9, 2023, 4:28:54 AM7/9/23
to mirt-package
Thank you so much for your quick and helpful reply.
Reply all
Reply to author
Forward
0 new messages