This paper investigates the relationship between location, agglomeration, access to credit, informality, and productivity across cities and industries in Cameroon. Emphasizing the link between micro-foundations and the data, the paper develops and estimates a structural model of occupational choice in which heterogeneous agents choose between formal entrepreneurship, informal entrepreneurship, and non-entrepreneurial work. Their decision-making process is driven by institutional constraints such as entry costs, tax enforcement, and access to credit. The model predicts that agglomeration has a non-monotonic effect on formalization, and entrepreneurial profits increase with agglomeration effects. Estimating the model by the generalized method of moments, the paper finds that the returns to capital and labor are not uniform across sectors and cities. Manufacturing industries are highly constrained in capital and the elasticity of capital is higher in Yaoundé and Douala, whereas labor elasticity is higher in Kribi. Counterfactual simulations show that an increase in roads provision can have a substantial impact in terms of output, formalization, and productivity. A reduction in the current interest rate has a large and significant impact on formalization and no significant effect on business creation. Likewise, while the current tax rate is suboptimal for most cities, a tax reduction policy would have a much greater impact on formalization than on business creation. These effects differ substantially across cities and sectors, suggesting that those policy instruments could be implemented accordingly to support formalization and business creation.