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: Questions about interaction terms using #.

From   YangSP <>
To   Statalist <>
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

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 

*   For searches and help try:

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