[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: re: WHILE command
Nick W said
How does one do this in cases where one cannot calculate, in advance,
the number of repetitions needed, or the list of items to be acted upon?
As Nick C has pointed out, nothing stops you from using a forvalues
loop over a large number of values and testing within the loop to
determine whether some condition is now satisfied (e.g., if the norm
of the gradient is now less than epsilon), and using
continue, break
to terminate the loop at that point.
Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/