Page 1 of 1

MLwiN L2 group numbers incorrect?

Posted: Fri Jan 12, 2018 10:46 am
by jennalm21
Hi everyone,
I'm using MLwiN for the first time with own data and could use some advice on an issue. I have a dataset of 742 students working in small groups of n ~ 5. In my dataset, the students are represented by a unique ID number (L1) (example: 1234567) and their group also has a unique ID number (L2) that is labeled between 1-208. Some group numbers are excluded from the L2 list as some groups were removed from the analysis for various reasons, so overall there are around 150 groups. When I try to estimate a simple multilevel model with no covariates, MLwiN correctly identifies that I have 742 students at L1, but mistakenly identifies 737 L2 groups.

I've double checked the data and it is all correct, with 742 students and approximately 5 students in each group. Groups are labeled correctly and tabulating them in MLwiN shows each number occurs around 5 times in the dataset. I've compared my data to the MLwiN example datasets on the CMM website and it looks like I've set everything up correctly. I've also compared the equation to examples on the CMM website and don't see any issues there. Altogether, I can't identify any reasons why 737 instead of 150 L2 groups are identified. Does anyone have any advice?
Thank you in advance for your help!

Re: MLwiN L2 group numbers incorrect?

Posted: Fri Jan 12, 2018 11:35 am
by ChrisCharlton
Except for cross-classified models with MCMC MLwiN identifies the units by changes in the ID rather than the ID number itself. It is therefore important that the data is sorted by the higher level ID variables. Could you confirm whether this is the case for your data?

Re: MLwiN L2 group numbers incorrect?

Posted: Fri Jan 12, 2018 5:25 pm
by jennalm21
That fixed it! You've saved me a major headache with a really easy fix :). Many thanks!