My dataset resembles the following:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(Importer Exporter Year Y X) 1 3 1990 .3 2 1 21 1991 .2 12 1 3 1992 .1 3 2 1 1992 .2 23 2 1 1992 .5 2 2 2 1991 .7 2 2 3 1990 .8 23 2 2 1991 1 1 end
Here, I have data on trade flows as a fraction of output (Y), for each importer-exporter pair, by year. I wish to run a Poisson-type regression, with trade flows on the LHS. Normally, the -ppml- command would have been ideal, but I have non-integer values for my y-variable, which makes that tricky.
Alternatively, I am making use of the glm command. Moreover, I wish to estimate the importer and exporter fixed effects as well. I basically run the following regression:
Code:
egen ex=group(Exporter) egen im=group(Importer) glm Y X ex* im*, family(poisson) diff iter(30)
Many thanks,
CS
0 Response to Saving fixed effects after GLM estimation
Post a Comment