Estimating the force of infection from incidence data