Hello all. I am facing the following issue in my research. I have panel data for sector level international trade flows, for approx. 90 sectors/industries. The issue is, for country-pairs which do not have any recorded sector-level trade, the sector is simply ommitted from the data. I would like to have all sectors available for all country-pairs, and for sectors in which there is no recorded trade data, to have a 0 as the "value" of the trade flow. Below is a sample of the data as-is:
Ideally, the AUS-NED trade flow would have sectors 1 and 3 added for the year 2000, with v equal to 0. Thank you!
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int year str3(exp imp) byte s int v 2000 "USA" "ARG" 1 1000 2000 "USA" "ARG" 2 2000 2000 "USA" "ARG" 3 50 2000 "AUS" "NED" 2 25 end
Comment