Functionality of nconstrain with the MHRM algorithm

42 views
Skip to first unread message

Emre Alagöz

unread,
Jul 15, 2025, 7:40:50 AM7/15/25
to mirt-package
Dear Phil and all,

I have a quick question regarding the use of nconstrain, as the subject tells it. I am using mirt to fit a multidimensional Item Response Tree (IRTree) model, but the model does not matter for the question I have (just putting it here so that others who search this could find this topic as well). 

When I use the EM algorithm, I can easily use the nconstrain to specify equality constraints with sign difference on the factor loadings, e.g., a1 = -a2. However, it does not work when I switch to MHRM algorithm. 

Is there a workaround or plan to make it possible with the MHRM? 

I know one option is to use createItem. However, since I later extract the score contributions with the estfun.AllModelClass() to test parameter heterogeneity with score-based recursive algorithm, this workaround is not suitable for me.

Thank you very much in advance for taking your time. 

Best wishes,
Emre
 

Phil Chalmers

unread,
Oct 24, 2025, 2:58:16 PM10/24/25
to Emre Alagöz, mirt-package
Hi Emre,

Interesting, I thought that this option should have worked as I recall adding the feature for both the EM and MHRM engines.... perhaps not though. I'll add it to the list for further testing. Thanks for bringing this to my attention.

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 visit https://groups.google.com/d/msgid/mirt-package/8a8edcd5-382b-4662-8184-62d10c301c97n%40googlegroups.com.

Emre Alagöz

unread,
Oct 31, 2025, 5:42:23 AM10/31/25
to mirt-package
Thank you a lot! 
Just a clarification, the MHRM algorithm runs anyway, but the estimated item parameters no longer follow the constraints. 

Best wishes,
Emre
24 Ekim 2025 Cuma tarihinde saat 20:58:16 UTC+2 itibarıyla Phil Chalmers şunları yazdı:
Reply all
Reply to author
Forward
0 new messages