Hierarchical Bayesian models for population ecology