Statalist


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

Re: st: Ambiguous Abbreviation Error


From   "Friedrich Huebler" <[email protected]>
To   [email protected]
Subject   Re: st: Ambiguous Abbreviation Error
Date   Wed, 16 Apr 2008 21:34:04 -0400

Christian,

. set varabbrev off

Friedrich

On Wed, Apr 16, 2008 at 4:22 PM, Christian Gregory
<[email protected]> wrote:
> 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/



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