This paper examines the influences of spatial and research and development (R&D) agglomerations on firm R&D behaviour. Analysis of firm-level data from China’s electronics industry reveals that both spatial and R&D agglomerations are positively related to R&D, highlighting the importance of network effects of agglomeration. Multinational enterprises invest less in R&D compared with domestic firms, because they tend to allocate R&D activity to the parent firm, leaving their Chinese affiliates to focus on manufacturing. No significant difference in R&D investment is observed between state-owned enterprises and private firms in China. These findings are confirmed through various robustness checks.