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]
st: Questions about interaction terms using #.
From
YangSP <[email protected]>
To
Statalist <[email protected]>
Subject
st: Questions about interaction terms using #.
Date
Tue, 8 Nov 2011 20:35:31 +0000
Dear Statalister,
I need to generate interaction terms using exporter and year in a standard gravity model.
For example, my data is listed as follows,
year exporter importer volume GDP_exporter GDP_importer Distance ... ...
1995 A B 1000 100 500 xxx
1996 A B 2000 200 600 xxx
1997 A B 3000 300 700 xxx
1998...
My two questions are:
Q1: What is the difference between "i.exporter*year" and "exporter#year"? I thought they were the same thing, but they are not because of the different resluts from them. Someone who can tell me what does each of them exactly mean.
Q2: If a command, e.g. qreg, does not support "exporter#year", how can I generate the interaction terms using "gen"?
Best wishes
Yang
*
* 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/