Hello,
I would like to analyse a gravity model using OLS and PPML methods. I am going to emphasize for PPML estimation to explain the model and also show the results of OLS. In the model, I use aggregated trade value (exports) as a dependent variable on the left side for different years and partners. Independent variables; distance, common language, contiguity and some questions which answer as 0 or 1. Excluding distance and aggregated trade value, all are dummy variables in the model. Also, I have added exporter time fixed effect and importer time fixed effect in the model. I would like to estimate the gravity model with time fixed effects for OLS and PPML. I found different options but I do not know which one will be more suitable for the model. If you could help me I would appreciate it.

1st option;

PPML:

egen exp_time = group(exporter year)
tabulate exp_time, generate(EXPORTER_TIME_FE)

egen imp_time = group(importer year)
tabulate imp_time, generate(IMPORTER_TIME_FE)

ppml aggregate_value ldistw contig comlang_off ec_prov_1_1_1 EXPORTER_TIME_FE* IMPORTER_TIME_FE*

OLS:

reg ltrade ldistw contig comlang_off ec_prov_1_1_1 EXPORTER_TIME_FE* IMPORTER_TIME_FE*, robust

When I run the code, I took multicollinearity error from most of the time-fixed effects variables.

2nd option;

PPML:

ppmlhdfe aggregate_value ldistw contig comlang_off ec_prov_1_1_1, absorb(year)

OLS:

reghdfe ltrade ldistw contig comlang_off ec_prov_1_1_1, absorb(year) robust


3rd option;

PPML:

ppml aggregate_value ldistw contig comlang_off ec_prov_1_1_1

OLS:

reg ltrade ldistw contig comlang_off ec_prov_1_1_1, robust

I took tables without any errors when I run that codes. However, it does not include time-fixed effects.

As a 4th option, I read about ppml_panel_sg command.

I could make some mistakes with the codes above as well while I am using them for my model. Also, I am a new user of STATA.

I need guidance for my estimation, I will be happy to get advice from you. Which command will be most effective to use and how should I use it?

Thank you.