Essays in the Economics of Innovation