Announcement

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

  • Rectangularization previous to estimating gravity equation using PPML with firm-level data

    Hi everyone,

    I am using a large firm-product-country dataset, in the sense that each observation describes "firm i imports $XX of input v from country j in year t". In addition, I have a bunch of control variables at different levels of aggregation (for example, I have "source country" variables, importer's "industry" variables, input-level characteristics, etc). My goal is to estimate the import elasticity of intermediate inputs using PPML on a gravity equation. I am struggling figuring out how to implement PPML in this situation given that all situations where I have seen it applied used country-level data. My questions are:
    1. To be able to use IMPORTER-YEAR and EXPORTER-YEAR fixed effects (to control for multilateral resistance terms), I need first to define what is an importer and an exporter in this setting. Picking the latter is intuitive because I have information on the country of origin of all inputs. However, the former is more complicated given that all firms are in the same country. Do I need to define an "importer" as a firm ? I fear that would need too many dummy variables, plus I would be discarding a lot of variation by estimating the elasticity using within-firm variation only. Would it be ok to define an "importer" as a sector instead, for example?
    2. More related to the implementation of PPML in Stata: my understanding is that unless one has a dataset that already includes transactions of zero value, one should always use the command fillin to rectangularize the dataset and then run ppml, say with the command ppmlhdfe. However, with data at the firm-level, when I try to rectangularize so each FIRM interacts with the same number of countries, the dataset size increases rapidly and soon enough I eat up all the computer's memory. I have been looking online for "best practices" regarding this issue but all I find is either based on the country-level case or, when focused on firm-level data, the discussion focuses on the implementation of PPML but not on the rectangularization that happens before.
    Thank you in advance for any help!

    Luis
Working...
X