Hi everyone,

I am doing an gravity model analysis on panel data of 10 countries for 30 years. This is my first time using Stata so I am not sure if I am doing this right. I am using the pooled OLS, random effects and fixed effects models.

I first regressed for pooled OLS model


reg ln_exports ln_distance ln_gdp_exporter ln_gdp_importer commonborder DAfta0 DAfta1 DAfta2 DAfta3 percentagetariffs noofNTMs DAfta0_percentagetariffs DAfta1_percentagetariffs DAfta2_percentagetariffs DAfta3_percentagetariffs DAfta0_noofNTMs DAfta1_noofNTMs DAfta2_noofNTMs DAfta3_noofNTMs

Then I did the random effects model

xtreg ln_exports ln_distance ln_gdp_exporter ln_gdp_importer commonborder DAfta0 DAfta1 DAfta2 DAfta3 percentagetariffs noofNTMs DAfta0_percentagetariffs DAfta1_percentagetariffs DAfta2_percentagetariffs DAfta3_percentagetariffs DAfta0_noofNTMs DAfta1_noofNTMs DAfta2_noofNTMs DAfta3_noofNTMs i.exporters i.importers i.year, re

Then I did the Breush-Pagan LM test, and it pointed towards the random effects model.

So I re-ran the random effects model, then estimates store re

Then I ran the fixed effects model

xtreg ln_exports ln_distance ln_gdp_exporter ln_gdp_importer commonborder DAfta0 DAfta1 DAfta2 DAfta3 percentagetariffs noofNTMs DAfta0_percentagetariffs DAfta1_percentagetariffs DAfta2_percentagetariffs DAfta3_percentagetariffs DAfta0_noofNTMs DAfta1_noofNTMs DAfta2_noofNTMs DAfta3_noofNTMs i.exporters i.importers i.year, fe

estimates store fe

hausman fe re, sigmamore

My hausman results pointed towards the fixed effects model

My questions are:

1) am I doing it the right way?
2) what about diagnostic tests? Does the robust option solves all the issues?

I actually also read that the robust option would help with problems with diagnostic tests, but if I use the robust option with the fe and re commands, I cannot run the hausman test. I tried to use the xtoverid, but it came out with o. option not allowed.

Please do help because I am not really well-versed in doing econometric analyses and I keep getting confused when reading other posts.

Thank you in advance!