State-space algorithms for estimating spike rate functions