to errors in measuring quantities. We clean the data in a number of ways which helps mitigate the latter issue. First, we exclude mineral products (chapters HS 25 to 27) and services (chapters HS 98 to 99).<sup>16</sup> Second, we keep only flows over a thousand USD. Third, we follow Amiti et al. (2014) and restrict the sample to 8-digit products which fall in the main 2-digit sector of the firm, and drop observations when unit values changes are above 200 percent or below -67 percent. We will also systematically report robustness exercises in which instead we drop the top and bottom 1 percent of observations in terms of changes of unit values, percentiles being computed at the level of the 2-digit sector and exporting country. Table 1 gives basic information on final sample size and period by origin country.

Table 1: Sample characteristics

|Country|Period|# observations|Obs./year|# frms|# dest.|# products|dest./frm|prod./frm|
|---|---|---|---|---|---|---|---|---|
|Bangladesh|2006-11|116,531|19,901|7423|158|821|10.7|8.1|
|Chile|2004-09|171,212|28,900|6174|155|2318|16.1|9.2|
|Jordan|2004-11|15,736|2,142|1630|133|808|10.4|4.6|
|Kenya|2006-11|26,062|4,782|2501|136|1442|9.6|13.0|
|Kuwait|2009-10|1,176|601|412|56|325|8.0|23.3|
|Lebanon|2009-10|15,717|7,859|2221|129|1101|12.1|29.6|
|Mexico|2003-06|199,942|50,834|26760|151|3541|8.9|21.7|
|Morocco|2003-10|91,606|11,467|5934|148|1715|8.0|11.6|
|Rwanda|2006-11|613|119|207|36|83|5.2|2.9|
|Tanzania|2006-11|4,660|868|820|94|483|7.5|5.6|
|Uganda|2005-11|4,129|655|592|77|363|7.9|5.7|
|Yemen|2007-10|1,182|404|387|52|157|6.9|9.0|

For comparability of statistics, in this table only products are defined at the six-digit level of the Harmonized System.

The sample is dominated by four countries, Bangladesh, Chile, Mexico and Morocco, in terms of transactions (both total and yearly) and number of firms. In the empirical analysis we will report our results on the entire sample as well as split by origin country. All origin countries have diversified destination portfolios, and the total number of HS6 products exported in a year ranges between 83 (Rwanda) and 3,541 (Mexico) out of a notional total of about nearly 6,000 HS6 lines. Sub-Saharan African firms are less diversified on average in terms of both number of destinations and products. Differences in terms of diversification are particularly important in terms of number of products (total or averaged by firm).

# **3.2 Country-level variables**

Exchange rates vis-a-vis the U.S. dollar are yearly averages from the IMF’s International Financial Statistics (IFS) and are deflated by consumer price indices to obtain annual real exchange rates (RER). Exchange rates are all expressed in local currency units (LCU) per dollar in the IFS. Let _eot_ and _edt_ , respectively, be the origin and destination countries’ exchange rates in LCU per dollar in year _t_ , and _Pot_ and _Pdt_ their consumer price indices.<sup>17</sup> Let _eodt_ be the average

> 16Mineral and primary products are commonly disregarded due to large and sudden fluctuations in international prices and associated terms-of-trade shocks, arbitrarily driving the export performance.

> 17In our baseline estimations, we have dropped the top percentile of country-pairs in terms of variance of bilateral real exchange rates. Dropping these countries which display extreme price variations (generally countries with hyperinflation) limits measurement error and only drops 0.07 percent of total trade value.

9