Estimating the time-varying effective reproduction number