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, 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 <>
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–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index