Bookmark and Share

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

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

st: foreach for interaction term

From   Barbara Engels <>
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:

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