A model of firm heterogeneity in factor intensities and international trade