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]

Re: st: foreach for interaction term


From   daniel klein <[email protected]>
To   [email protected]
Subject   Re: st: foreach for interaction term
Date   Tue, 24 May 2011 16:41:46 +0200

Oliver is assuming that the local `foreign' (now `x') contains
something, but I guess (one of the) problem(s) is that it does not
contain anything at all.

There are minor issues I would like to address first.

1. When looping over any_list, you have to use -in- not -of- (see help foreach).
2. The local name must not be given in -foreach lname-, not it's
content (see help foreach).
3. The use of  wildcards like (*ger) inside the loop will not do what
you probably expect. How is Stata supposed to calculate `x'_ims *
usager belger chinbrd ...?

It is hard to give better advice, but I guess you need to loop over
two lists (of country names)?

Best
Daniel
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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