We construct an endogenous growth model with random interactions where firms are subject to distortions. The TFP distribution evolves endogenously as firms seek to upgrade their technology over time either by innovating or by imitating other firms. We use the model to quantify the effects of misallocation on TFP growth in emerging economies. We structurally estimate the stationary state of the dynamic model targeting moments of the empirical distribution of R&D and TFP growth in China during the period 2007–2012. The estimated model fits the Chinese data well. We compare the estimates with those obtained using data for Taiwan and perform counterfactuals to study the effect of alternative policies. R&D misallocation has a large effect on TFP growth.