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, statalist.org is already up and running.


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

st: Questions about interaction terms using #.


From   YangSP <ekastenyang@hotmail.com>
To   Statalist <statalist@hsphsun2.harvard.edu>
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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index