Poisson regression and model selection code for class