Error when fitting 2 level bivariate model

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
ddsswick
Posts: 9
Joined: Thu Aug 10, 2017 3:27 pm

Error when fitting 2 level bivariate model

Post by ddsswick » Thu Aug 10, 2017 3:40 pm

When I fit a 2 level bivariate model with both variables binary I get the following error sometimes.

"Error while obeying bath file: .... line number 51:
calc F~(H) = expo(H)*(1+expo(H))^(-2)
140 numeric errors in calculate command, first 20 affected entries listed.
Affected entries replaced with system missing.. "

When I re-run I won't get the error. Only occasionally it happens. But I want this for a simulation and this should be run 1000 times as a loop. When the error occurs somewhere the whole simulation stops there. Is it possible to avoid this error? OR to prevent stopping the loop even if the error occurs in one round and it skips to the next?

Thank you very much in advance..

ChrisCharlton
Posts: 890
Joined: Mon Oct 19, 2009 10:34 am

Re: Error when fitting 2 level bivariate model

Post by ChrisCharlton » Thu Aug 10, 2017 5:58 pm

If you issue the command

Code: Select all

ERRO 0
then MLwiN will not stop running the macro if it encounters an error. If you will probably also want to use the

Code: Select all

LOGO <filename> 1
command so that you can record the outputs in a log file and review them afterwards. If you want to determine whether the previous model ran successfully then the

Code: Select all

CONV <B>
command may be useful. You can find details of these commands in the MLwiN help file.

An alternative to the above is to call MLwiN via the R2MLwiN R package, or -runmlwin- Stata command and then check each time you call it whether it was successful.

ddsswick
Posts: 9
Joined: Thu Aug 10, 2017 3:27 pm

Re: Error when fitting 2 level bivariate model

Post by ddsswick » Sat Aug 12, 2017 3:17 pm

Thank you very much for your helpful answer... I really appreciate it...

Post Reply