A Bayesian state-space formulation of dynamic occupancy models.