[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Ambiguous Abbreviation Error

From   Christian Gregory <>
Subject   st: Ambiguous Abbreviation Error
Date   Wed, 16 Apr 2008 16:22:02 -0400


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.


*   For searches and help try:

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