Hello! I’m trying to follow along with the “Multilevel Models in Julia” tutorial by Yichi Zhang (I can’t include a link, but it’s publicly available) using my own data. In this exercise, you implement a random intercepts model (mm1), one with only the level-2 predictor (mm2), one with only the level-1 predictor (mm3), and then one with a cross-level interaction (mm4). I was able to do all of that successfully, but when I try to call MixedModels.likelihoodratiotest(mm1,mm2,mm3,mm4) I get the following error:
Through trial and error, I’ve found that the likelihood ratio test will run successfully if I exclude mm3, which (as in the tutorial) has just the level-1 variables. I’m a little confused as to why it’s causing an error when mm4 has those variables in it as well. Does anyone have an inkling as to what I might be doing wrong here?
