R&D policy, productivity growth and distance to frontier