We analyse the determinants of the decline in measured research productivity (the patent/R&D ratio)using panel data on manufacturing firms in the U.S. for the period 1980-93. We focus on three factors: the level of demand, the quality of patents, and technological exhaustion. We first develop an index of patent 'quality' using detailed information on patents in the U.S. in seven technology fields. Using a factor model, we construct a minimum-variance index based on four patent characteristics and show that using multiple indicators substantially reduces the measured variance in quality. We then show that research productivity at the firm level is negatively related to the patent quality index and the level of demand, as predicted by an optimizing model of R&D, and positively related to the stock market valuation of patented innovations held by firms.