Patent Rights and Innovation: Evidence from National and Firm Level Data