Hello,
I have a *.do file in which I execute two loops, one inside the other.
-----Example begins------
forvalues i = 1/3 {
g h`i' =0 ....
local n = _N ....
forvalues j = 1/`n'{
.....
replace h`i' = expression if id==`j'
}
}
-----Example Ends----------
The first time through the inner loop (i = 1), it works fine. And it is also fine for the first iteration of the second time through (i =2 j = 1). After that, I get an error message: r110 h Ambiguous Abbreviation.
I could write the loops as an ado file and bootstrap, but I'm wondering why I get this error and if there is a way to work around it in the program's present form.
Thanks,
Christian
*
* 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/