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!
Related Posts with Panel Data Regression on Gravity Model
HH dataHello please, am new with stata. i want to do household analysis, please what is the way forward …
identifying lagged dependent variable, panel dataDear Stata community, since I am a new Stata user, I apologize if my question is trivial. I tried t…
POOLED OLS, test for heteroskedasticity and autocorrelationHello, everyone. I run a hausman test to help me choose whether I will use random effect (RE) or fix…
Two variables in one histogram graph in StataDear All, Hope you are fine. Could you please help me to create an histogram of two variables (M0 …
Loop over values not workingDear all, I have a panel dataset (panelvar is id and timevar is year). I have been trying to genera…
Subscribe to:
Post Comments (Atom)
0 Response to Panel Data Regression on Gravity Model
Post a Comment