Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • PPML and OLS Estimation with time-fixed effects

    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.
    Last edited by Ezgi Hazal Sanli; 21 Aug 2022, 14:32.

  • #2
    Dear Ezgi Hazal Sanli,

    You mention 3 different commands and all of them can estimate the same model, so you should get the same results no matter which one you use. I recommend that you use ppmlhdfe, which is the more recent of these commands and make sure you specify your fixed effects correctly.

    Best wishes,

    Joao

    Comment


    • #3
      Dear @Joao Santos Silva,

      Thank you so much. It is really helpful and everything is clear for me now.

      Best regards,
      Ezgi
      Last edited by Ezgi Hazal Sanli; 22 Aug 2022, 08:39.

      Comment

      Working...
      X