Three empirical essays on R&D subsidies and innovation in firms