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
Error fitting multinomial 2-level model
-
- Site Admin
- Posts: 432
- Joined: Fri Apr 01, 2011 2:14 pm
Re: Error fitting multinomial 2-level model
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
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
Re: Error fitting multinomial 2-level model
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
-
- Site Admin
- Posts: 432
- Joined: Fri Apr 01, 2011 2:14 pm
Re: Error fitting multinomial 2-level model
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
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