R2MlwiN error - ... iteration aborted

Welcome to the forum for R2MLwiN users. Feel free to post your question about R2MLwiN 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 R2MLwiN: Running MLwiN from within R >> http://www.bris.ac.uk/cmm/software/r2mlwin/
Post Reply
mantoine
Posts: 2
Joined: Wed Oct 14, 2015 11:25 am

R2MlwiN error - ... iteration aborted

Post by mantoine »

Dear all,

I am R user, but however new to multilevel models and to MLwiN
I am running a two-level model with Community (level-2) and Farmer (level-1).
I have 11 variables at level-1 unit and 6 at level-2: in total, 3 quantitative variables and 14 factors.
The dependent variable (Y) is a binary variable coded with 1 and 0.
The total number of farmers is 391 within 23 communities.

The syntax is below:

mymodel<-runMLwiN(logit(Y,denomb)~1+Q1+Q2+Q3+F1+F2+F3+F4+F5+F6+F7+F8+F9+F10+F11+F12+F13+F14+(1|Community),D="Binomial",estoptions=list(EstM=1),data=mydata)

With this syntax, I got the following message:

"error while obeying batch file ....:
NEXT

v gone -ve definite for block 0 iteration aborted(fixed pass)"

Can anyone help?
Thanks

richardparker
Posts: 58
Joined: Fri Oct 23, 2009 1:49 pm

Re: R2MlwiN error - ... iteration aborted

Post by richardparker »

Hi - the error you are getting is from MLwiN, and it suggests it is having difficulties estimating the model you have specified (given the data). Since you have a large number of fixed effects (as each of the factors will consist of a number of levels, and so a relatively large number of dummy variables will be specified), it may be that it is not possible to estimate all the parameters (the community effects and the fixed effects) in this discrete response model (due to how the values of each variable are distributed with respect to each other; i.e. how correlated they are).

It might help diagnose the issue if, rather than starting with this relatively complex model, you instead fit a simpler model (e.g. with fewer fixed effects), and then build up complexity from there. Then, if you encounter the same issue during that process, the incremental nature of such a model-building strategy should help diagnose where the problem lies.

Incidentally, Module 8 of the free online LEMMA training course (https://www.cmm.bris.ac.uk/lemma/) offers useful advice on model-building, which may be helpful.

mantoine
Posts: 2
Joined: Wed Oct 14, 2015 11:25 am

Re: R2MlwiN error - ... iteration aborted

Post by mantoine »

Hi

Many thanks for this reply and for the link.
Indeed, when I removed one variable, for example Q1, the model converged. After removing Q2 and bringing back Q1, the model converged too.
As you mentioned there are probably some correlation within the data I need to sort out.
So I will have a careful look.

Thanks once more.

Post Reply