Announcement

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

  • HDFE-PPML. Interacting dyadic fixed effects with the time trend

    Hello,
    I am currently estimating a standard gravity model to estimate the effect of trade agreements on trade follows using importer and exporter-year fixed effects to account for the multilateral resistance term, and dyadic fixed effect to account for unobserved time-invariant heterogeneity. The implementation looks like this.
    Code:
    use "http://fmwww.bc.edu/RePEc/bocode/e/EXAMPLE_TRADE_FTA_DATA" if category=="TOTAL", clear 
     * create my fixed effects cap egen imp = group(isoimp) cap egen exp = group(isoexp) * run the model ppmlhdfe trade fta, absorb(imp#year exp#year imp#exp) cluster(imp#exp)
    Some recent articles (e.g. Bergstrand et al. 2015) suggested to interact bilateral fixed effects with a trend term. This allows to account for trends over time in the effects of unobserved bilateral heterogeneity. I would like to use a similar approach but I am not sure about how it is correctly implemented using the ppmlhdfe command. I have tried the following but it is not working. I fear that it is putting a dyad-time fixed effect rather than interacting my dyad fixed effect by the time trend. [CODE] * create my diadic dummies cap egen impexp = group(isoexp isoimp) * estimate the model ppmlhdfe trade fta, absorb(imp#year exp#year impexp#year) cluster(imp#exp) insufficient observations [CODE] Does anyone know how I could estimate this? thanks a lot in advance










  • #2
    Sorry, for some reason the message does not properly display the two code chunks, here they are:

    Code:
    use "http://fmwww.bc.edu/RePEc/bocode/e/EXAMPLE_TRADE_FTA_DATA" if category=="TOTAL", clear  
      * create my fixed effects   cap egen imp = group(isoimp)   cap egen exp = group(isoexp)   * run the model   ppmlhdfe trade fta, absorb(imp#year exp#year imp#exp) cluster(imp#exp)

    and

    Code:
    create my diadic dummies
    cap egen impexp = group(isoexp isoimp)
    
    * estimate the model ppmlhdfe trade fta, absorb(imp#year exp#year impexp#year) cluster(imp#exp)
    insufficient observations








    Comment


    • #3
      Hi Alessandro,

      Following the example you are using, you can include pair-specific time trends as follows:

      Code:
      use http://fmwww.bc.edu/RePEc/bocode/e/EXAMPLE_TRADE_FTA_DATA if category=="TOTAL", clear
      cap egen imp=group(isoimp)
      cap egen exp=group(isoexp)
      
      sum year
      gen trend = year-r(mean)
      
      ppmlhdfe trade fta, a(imp#year exp#year imp#exp imp#exp#c.trend) cluster(imp#exp) nolog
      Compare with

      Code:
      ppmlhdfe trade fta, a(imp#year exp#year imp#exp) cluster(imp#exp) nolog
      Regards,
      Tom

      Comment


      • #4
        Dear Tom,
        thanks a lot for the quick reply, you are as always extremely helpful

        Comment


        • #5
          Hi, i have installed hdfeppml in stata. Also uploaded CEPII gravity database. Now getting error with following code .
          ppmlhdfe tradeflow_imf_o gdp_o gdp_d pop_o pop_d dist entry_cost_d
          if (iso3_o == "IND" & iso3_d == "CHN")
          absorb(iso3_o iso3_d ) vce(robust)

          Stata is not recognizing absorb. Can anyone help? I am using Stata 14.

          Comment

          Working...
          X