Page 1 of 1

Error when fitting 2 level bivariate model

Posted: Thu Aug 10, 2017 3:40 pm
by ddsswick
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..

Re: Error when fitting 2 level bivariate model

Posted: Thu Aug 10, 2017 5:58 pm
by ChrisCharlton
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.

Re: Error when fitting 2 level bivariate model

Posted: Sat Aug 12, 2017 3:17 pm
by ddsswick
Thank you very much for your helpful answer... I really appreciate it...