to other indicators, including population, GDP, employment in micro and small enterprises, the distribution of registered firms, and patterns of internal migration. This spatial concentration is driven by inequality along the extensive margins of the firm network, i.e. the location of firms and trading relationships, rather than transaction volumes. Notably, formal firms maintain twice as many links to buyers and suppliers in urban hubs as they do to formal firms within their own counties, indicating that within-county trade is less common than inter-county trade with firms in Nairobi. Following this, we show that informality is not evenly distributed across space but its incidence varies systematically across sectors, regions, and firm position in the supply chain. Informal firms are more likely to be located downstream of large formal firms, and informality negatively correlates with regional economic size and income. As a result, we expect that accounting for the informal sector can systematically alter the structure of the observed firm network rather than introducing random measurement error. As we do not directly observe trade flows between informal firms, we rely on a structural model to recover a network that accounts for informal activity.

We introduce and estimate a network formation model with heterogeneous firm types following Bramoull ́e et al. (2012) to predict a revised network. In our adaptation of the model, we classify firms based on their sector, location, and size, due to the substantial heterogeneity along these three dimensions documented in the empirical section. The key advantage of the model is that it allows for a flexible network formation process that accounts for heterogeneous linking preferences along the above dimensions. Moreover, it allows firms to form links both independently (undirected search) and through the existing connections of their suppliers (directed search). The model then provides a unique steady-state predictions for the number of links between firms of different sector-location-size types. We first estimate the model to predict the Kenyan firm network as observed. We find that new firms choose 45% of their suppliers through undirected search, conditional on their bias, and the remaining 55% of suppliers are found via existing suppliers.<sup>5</sup> The model-predicted network not only fits the empirical distribution of outlinks (i.e. the number of buyers) well, but also performs well with respect to untargeted moments, such as the share of links accounted for by Nairobi- and Mombasa-based firms.

Using the estimated model, we then predict a revised network that accounts for informal firms by combining the model with granular real-world data on the sectoral and regional composition of the informal sector. Updating the entry probabilities of firms by sector, location, and size requires data on the spatial and sectoral dispersion of economic activity, for which we draw on microdata from the labour force module of the 2019 population census. We initially assume that

> 5In comparison, Chaney (2014) finds that only 40% of all relationships of French exporters with international trade partners are formed via directed search. Our estimate of 55% of links being formed as a result of directed search could suggest that linking frictions are potentially even more binding for firms in Kenya’s domestic firm network.

3