Three-way interaction in MLwin 2.32 vs lme4 in R

Welcome to the forum for MLwiN users. Feel free to post your question about MLwiN software here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Remember to check out our extensive software FAQs which may answer your question: ... port-faqs/
Post Reply
Posts: 1
Joined: Sun Jun 02, 2019 8:19 pm

Three-way interaction in MLwin 2.32 vs lme4 in R

Post by DavidSt83 »

Hello everyone,

I compared the results of MLwiN and lme4 on a set of data from our lab by computing the exact same models in the two programs.

Both programs gave the exact same results for the two-way interaction models. However, after adding a three-way interaction, the results significantly started to differ betwenn MLwiN and lme4. Notably, the two-way interaction became significant in MLwiN but not in lme4 (see the linked picture for details).

Screenshot of the models in both programs:

Would you know what is the cause of this difference?

Best regards,


Posts: 1165
Joined: Mon Oct 19, 2009 10:34 am

Re: Three-way interaction in MLwin 2.32 vs lme4 in R

Post by ChrisCharlton »

It looks to me as if you are running different models for the second case. You will note that only 6 fixed parameters are being estimated for the MLwiN case, whereas for lme4 you have 7. Looking at the parameter names I think that it is likely that the MLwiN model is missing the rap_t_st.age.viv term.

A further test that you could do when comparing the software would be to run MLwiN from R via the R2MLwiN package ( as this will ensure that the data being used is the same and any derived variables should be calculated in the same way for both.

Post Reply