Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Invalid Syntax


From   Amir Sadeghi Emamgholi <[email protected]>
To   [email protected]
Subject   st: Invalid Syntax
Date   Mon, 11 Nov 2013 10:36:06 -0500

Hello Statalisters,

Sorry for this stupid question. I cannot figure out the problem with
my drop command in the following loop. When I run it I get the -
Invalid Syntax - error message.

The loop:

foreach i in E_I3 E_I4 E_I5 E_I6 E_I7 E_I8 E_I9 E_I10 E_I11 {
      qui summ `i'
      drop `i' if r(N) == 0
}

Thanks!
Amirsa

P.S. when I use - drop "`i'" if r(N) == 0 - I get the - "E_I3 invalid
name - error message.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index