Page 1 of 1

Three-way interaction in MLwin 2.32 vs lme4 in R

Posted: Sun Jun 02, 2019 8:44 pm
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: https://ibb.co/JBfP04s

Would you know what is the cause of this difference?

Best regards,

David

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

Posted: Mon Jun 03, 2019 4:04 pm
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 (https://www.bristol.ac.uk/cmm/software/r2mlwin/) 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.