Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: foreach for interaction term


From   Barbara Engels <engels.ba@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: foreach for interaction term
Date   Tue, 24 May 2011 15:52:55 +0200

Dear Stata-Experts,

i want to construct an interaction term, consisting of the import shares of different countries and the R&D stocks of the countries. i.e. my interaction term should be

usa_ims*usabrd for the usa interaction term (import shares ims times business r&D stocks brd)
and so on.

my try:

 foreach `foreign' ger_ims bel_ims chin_ims usa_ims uk_ims it_ims switz_ims {
  2. ge foreignbrd*=`foreign'*(*brd)
  3. }

needless to say that it didn't work.
can anybody help?
Thank you!!
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index