Dear Scott,
If I use
xi:xtreg depvar indepvar i.year i.exporter, fe i(identifier)
wouldn't I be creating importer, exporter and year dummy variables a_i, b_j,
c_t? What I want instead is importer-year, exporter-year and importer-exporter
fixed effects a_it, b_jt, c_ij.
Also, I have a large number of importers and exporters and using dummy
variables is not feasible. My goal is to demean the data and regress the
demeaned data.
Kremena
Scott Cunningham wrote:
Dear Kremena,
Stata has the ability to do this automatically within its -xt- commands. If
you were wanting to eliminate the within importer fixed effects in a linear
model, it would be:
xi:xtreg depvar indepvar, fe i(identifier)
where identifier identifies each importer. You would include year and exporter
effects by:
xi:xtreg depvar indepvar i.year i.exporter, fe i(identifier)
Try this and it should do what you're wanting it to do.
sc
On Apr 27, 2006, at 2:48 AM, Kremena Platikanova wrote:
Dear List Members,
I have a panel of bilateral trade data. I want to estimate a model with
importer-year, exporter-year and importer-exporter fixed effects:
Y_ijt = a_it + b_jt + c_ij + d*X_ijt + e_ijt
where i = importer, j = exporter, t = time.
If using dummy variables is not feasible, is it appropriate to demean the data
in the following way:
Y_ijt* = Y_ijt - MeanY_it - MeanY_jt - MeanY_ij + 2*Overall MeanY
(where MeanY_it is Y_ijt avaraged over j) and similarly for X_ijt*, and then
regress Y_ijt* on X_ijt*.
Thank you for your help,
Kremena
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/