Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: inner loop

From   James Jetton <>
Subject   st: RE: inner loop
Date   Tue, 5 Nov 2002 13:35:13 -0500

Hans J. Baumgartner
 is it possible to run an inner loop using the for command?
 I think it is
 not possible but could someone point me to a command that allows for
 such an inner loop?

 What I would like to do is basically the following:

 for any a b c: for num 1984/2000: replace z=YX

Nested for loops often fail if the ids are not explicitly specified. For example

for any a b c: for num 1984/2000:

will fail but

for X in any a b c: for Y in num 1984/2000:

will work.

This appears to be a bug in the for ado. Been bitten by this hemipteran more than once.

Although I'm not sure what you are trying to do with "replace z=YX".

James Jetton
* For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index