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   Richard Goldstein <[email protected]>
To   [email protected]
Subject   Re: st: foreach for interaction term
Date   Tue, 24 May 2011 10:22:56 -0400

that is invalid syntax, just as Stata informed you; if you use "of" in
your -foreach-, then you must include what it is (e.g., varlist); see
the help file for -foreach-

Rich

On 5/24/11 10:21 AM, Barbara Engels wrote:
> well, now i modified it again, to make it more understandable for me and for stata.
> 
>  foreach `x' of ger_ims bel_ims chin_ims usa_ims uk_ims it_ims switz_ims {
>   2.   ge foreignbrd*=`X'*(*brd)
>   3.  }
> invalid syntax
> r(198);
> 
> I want it to create values containing the product of import share and R&D stock (=foreignbrd) of each country for each year.
> 
> Is that understandable? I 'm a little confused.
> 
> El 24.05.2011, a las 16:02, Oliver Jones escribió:
> 
>> Hi,
>> it is hard to tell what went wrong without knowing what the local `foreign' contains.
>> It would also be helpful if you could report the error message Stata issued.
>> I guess you missed to tell Stata what type of list you want to cycle through...
>> Best
>> Oliver
>> -- 
>> Universität Bielefeld
>> Fakultät für Wirtschaftswissenschaften
>> Lehrstuhl für Ökonometrie und Statistik
>> - -
>> Bielefeld University
>> Faculty of Business Administration and Economics
>> Chair of Econometrics and Statistics
>> - -
>> Raum / room:  V9-110
>> Tel / phone:  +49 (0)521 106 4871
*
*   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