We evaluate statistically how the R&D management of a firm affects its research quality. Controlling for technology areas, a firm having short citation lag relative to the prior patent literature has a significantly high patent quality in terms of patent citation and the number of claims per patent, suggesting that the speed of R&D mattes. Such an effect is more significant in IT than in biotechnology & pharmaceuticals. A firm having high citations to the science literature has also a high patent quality, indicating the importance of the capability to use scientific knowledge. Such an effect is significant both in biotechnology & pharmaceuticals and in IT.