MLwiN L2 group numbers incorrect?

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: http://www.bristol.ac.uk/cmm/software/s ... port-faqs/
Post Reply
jennalm21
Posts: 2
Joined: Fri Jan 12, 2018 9:53 am

MLwiN L2 group numbers incorrect?

Post 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!
ChrisCharlton
Posts: 1351
Joined: Mon Oct 19, 2009 10:34 am

Re: MLwiN L2 group numbers incorrect?

Post 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?
jennalm21
Posts: 2
Joined: Fri Jan 12, 2018 9:53 am

Re: MLwiN L2 group numbers incorrect?

Post by jennalm21 »

That fixed it! You've saved me a major headache with a really easy fix :). Many thanks!
Post Reply