Hello,
In order to estimate mixture models i need to generate multiple random starts and estimate the local maxima of the likelihood by the expectation-maximization algorithm. Thus, i have two loops, one outer loop for a particular set of starting values and an inner loop for the EM iterations. For some bad start values the EM-iterations encounter computational problems such as singular matrices, overflows,.. This is not a problem, just discard these start values and try a new set. I try to do this as follows:
onerror=" goto st; resume; ";
do s=1 to n_start;
call push(onerror);
st: run start; /*some module to generate start values*/
do e=1 to em_iterations;
run em; /*some module to perform 1 EM-iteration*/
end;
end;
This however doesn't work and i get ERROR: Unresolved label: ST. I've also tried
onerror=" do; goto st; resume; end;"; but that doesn't work either.
Does anyone have an idea how to make this work (or knows a better way to go about this)?
Thanks in advance,
Nicolas