Error fitting multinomial 2-level model

Welcome to the forum for runmlwin users. Feel free to post your question about runmlwin 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!

Go to runmlwin: Running MLwiN from within Stata >> http://www.bristol.ac.uk/cmm/software/runmlwin/
Post Reply
Julia1972
Posts: 2
Joined: Wed Oct 10, 2012 2:16 pm

Error fitting multinomial 2-level model

Post by Julia1972 »

I am trying to fit a multinomial 2-level model. When I execute estimation PQL 2 order, I got the following error:

error while obeying batch file C:\Program Files (x86)\MLwiN v2.26\i386\..\multicat\order2a.mc at line number 20:
calc ‘f~~(h)’ = ‘f~(h)’*(‘f~(h)’/’pi’-C1177/(1+C1178))

Any ideas?

Thanks!

Julia
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: Error fitting multinomial 2-level model

Post by GeorgeLeckie »

Hi Julia,

This is an MLwiN side error message rather than a runmlwin generate error.

Basically you have run into a convergence error. To maximise the changes of convergence...

Try building up to your final model very gradually adding one extra variable/parameter at a time and each time using the parameter estimates from the previous model as starting values for the current model. Put the most important variables/paramters in first, add less important ones later in the model building process.

Also, use MQL1 throughout (it is more stable) then fit any final models in PQL2 or ideally MCMC

See previous posts for further discussion on this issue

Best wishes

George
Julia1972
Posts: 2
Joined: Wed Oct 10, 2012 2:16 pm

Re: Error fitting multinomial 2-level model

Post by Julia1972 »

Thanks George for your prompt replied! I am afraid that I got the error even when just adding the first covariate in the model so not sure your point will help me here ... I will try to add a covariate and keep using MQL1 and see what happens. Cheers, Julia
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: Error fitting multinomial 2-level model

Post by GeorgeLeckie »

Hi Julia,

Even when there are no covariate, to fit the model by pql2, use the mql1 estimates as starting values (e.g. use the initsprevious option)

If you still get problems then they may reflect your data, you may have a very unbalanced design (e.g. lots of groups with one unit) or very extreme group proportions (e.g. lots of groups where the response does not vary) etc.

Perhaps your categorical response has some very rare categories, this may also lead to problems. You may want to start by fitting models with fewer categories (i.e. only the most populous ones). You might even want to consider first fitting a binary response version of the model if it makes sense to collapse the response to two categories.

Best wishes

George
Post Reply