I develop and test a model of strategic R&D investments where innovating and non-innovating firms compete on the basis of their ability to reduce costs and imitate rivals. I find that a larger proportion of non-innovating rivals stimulates cost-reducing investments and attenuates the disincentive effect of imitation by innovators on firm level R&D. Key model properties are verified by estimating the first order condition for the optimal choice of R&D, using the 1994 Carnegie Mellon survey of U.S. industrial R&D. Results also suggest that R&D and size are simultaneously determined, with R&D being proportional to size, as predicted by the theoretical model.