Problem with workaround cross-classified models bug in 2.24

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
judyklein12
Posts: 2
Joined: Thu Jan 05, 2012 8:52 pm

Problem with workaround cross-classified models bug in 2.24

Post by judyklein12 »

I am trying to fit a three-level cross-classified model. In version 2.21 the models run smoothly without problems. When using version 2.24 (because I want to use runmlwin) I receive wrong estimates, i.e. the variance components at the three levels are wrong. More specifically, almost the complete variance is attributed to the lowest level only, although I know that the variance should be distributed across the levels.
I saw the notice about the bug in version 2.24 on the MLwiN bugs page:
“…This has the unexpected effect that if a cross-classified model has 0s in the identifier column for a classification it will assume that these data points are not associated with a higher level unit in that classification.
….
We have fixed this bug and version 2.25 of MLwiN will only treat 0 as a special value for multiple membership models and not cross-classified. As a workaround until version 2.25 appears the user can add 1 to the id column in question via the calculate window to fix the problem”
I assume that I am dealing exactly with this bug and wonder how to implement the workaround. I have tried adding 1 to the id column in question but that does not work (open the calculate window, choose variable in questions, choose +1 and calculate). I guess I am doing something wrong here.
I would very much appreciate any advice on how to correctly implement the workaround.

Thank you very much in advance!
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: Problem with workaround cross-classified models bug in 2

Post by ChrisCharlton »

If you are experiencing this bug then adding one to the relevant classification columns should have fixed it. One other possibility is that because cross-classified models can't get starting residuals from a previously specified model that it is taking longer for the estimates to get into the right range. It might therefore be worth running the model for more iterations and seeing what the chains look like. If you still get the problem would it be possible to email me an example worksheet that demonstrates the problem that you are having and I will investigate it further.
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: Problem with workaround cross-classified models bug in 2

Post by ChrisCharlton »

Looking at your data it appears that none of your identifier variables contain a value of zero, so that bug isn't the cause of the difference that you are seeing.

A more likely cause of this issue is the change in starting values for the residuals in cross-classified models that was made in version 2.24 (see the 2011 addition to the preface of the MCMC manual http://www.bristol.ac.uk/cmm/software/m ... cmc-09.pdf). If you look at the parameter traces (model->trajectories) and MCMC diagnostic information (by clicking on the trace plot for a parameter) you will see that some of the parameters have not stabilized after the default burnin period. By running the model for more iterations you will see that they do not start to do so until after approximately 9000 iterations. I would suggest that for this particular model that you increase the burnin to 9000 and see if the estimates that you get are closer to what you were expecting.
judyklein12
Posts: 2
Joined: Thu Jan 05, 2012 8:52 pm

Re: Problem with workaround cross-classified models bug in 2

Post by judyklein12 »

Dear Chris,

Increasing the burinin to 9000 solves my problem!
thanks a lot.

cheers!
Post Reply