Dear all,
I am R user, but however new to multilevel models and to MLwiN
I am running a twolevel model with Community (level2) and Farmer (level1).
I have 11 variables at level1 unit and 6 at level2: 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+(1Community),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
R2MlwiN error  ... iteration aborted

 Posts: 59
 Joined: Fri Oct 23, 2009 1:49 pm
Re: R2MlwiN error  ... iteration aborted
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 modelbuilding 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 modelbuilding, which may be helpful.
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 modelbuilding 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 modelbuilding, which may be helpful.
Re: R2MlwiN error  ... iteration aborted
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.
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.