relationship between firm sales and firm-to-firm connections (Bernard et al., 2022; Bacilieri et al., 2023) as well as potential differences in how small firms organize their supply chains across space and sectors.<sup>21</sup> Table B1 shows that small firms within the same sector and county are less likely to directly source from manufacturing firms (upstream), but instead are more likely to source from retailers or wholesalers (downstream). Further, they are less likely to source from Nairobibased suppliers and more likely to source locally.

Third, the model incorporates a flexible network formation process such that the emergent degree distribution can follow a power law. The underlying dynamic network formation process gives rise to the substantial inequality in outdegrees across firms that has been widely documented in the literature (Bernard and Moxnes, 2018; Panigrahi, 2022; Bernard et al., 2022; Bacilieri et al., 2023). Figure B1 plots the outdegree and indegree distribution of the formal firms in our VAT data, revealing a very unequal degree distribution that resembles a power law. Our framework is flexible and allows us to estimate the share of firm-to-firm links formed via directed search (searching among the trade partners of existing suppliers) versus undirected search (often referred to as _random search_ in the networks literature (Jackson and Rogers, 2007)).

# **4.2 Model Setup**

Consider an economy with a set of firms denoted by _N_ . Each firm _i ∈ N_ is of a given type _θi ∈_ Θ where Θ is the set of all possible types. In our application, we specify firm types as unique sector-county-size combinations, i.e. all firms in the same sector, county, and size group are classified as the same type. Our aim is to predict a matrix _π_ that captures the number of links that exist between every possible pair of firm types.

The network formation process is as follows. In every period _t_ , a new buyer firm of type _θ_ enters with probability _p_ ( _θ_ ). Hence, the number of firms in the network in any given time period is equal to the number of time periods that have passed since _t_ = 0. In order for its operations to be viable, the new firm needs to source inputs from a fixed number of suppliers _m_ . To do this, it first chooses a sector-county-size pair (i.e. a type) with probability _p_ ( _θ, θ_<sup>_′_</sup> ) for all _θ_<sup>_′_</sup> in Θ. The probabilities _p_ ( _θ, θ_<sup>_′_</sup> ) represent the firm’s bias in terms of sectors, regions, and firm size types it wants to link with. In other words, the probability that a buyer of type _θ_ finds a supplier of type _θ_<sup>_′_</sup> may not necessarily be equal to the probability of _θ_<sup>_′_</sup> in the firm population. These biases can reflect production technologies or homophilous preferences arising out of search costs and information frictions. Firms in a location _θ_ might find it easier to link to firms in location _θ_<sup>_′_</sup> that is close to them as opposed to firms in location _θ_<sup>_′′_</sup> that is far. Likewise, firms in sectors that

> 21Economies of scale in trade cost at the firm level give rise to supply chain structures with several intermediaries (Grant and Startz, 2022). Hence, we expect the linking patterns of small firms to diverge from large firms. Relevant for our case, economies of scale can result in firms of different sizes, but operating within the same geography and sector exhibiting different sourcing patterns.

19