solution
Schoener [1968] collected information on the distribution of two Anolis lizard species (A. opalinus and A. grahamii) to see if their ecological niches were different in terms of where and when they perched to prey on insects. Data are in file lizards.txt. Perches were classified by twig diameter, their height in the bush, whether the perch was in sun or shade when the lizard was counted, and the time of day at which they were foraging. The response variable is a count of the number of times a lizard of each species was seen under each of the contingencies. GLM was not yet available when the study was published. Obviously, a Poisson regression can be appropriate for analyzing the data. Develop a model using the general principles of Section 5.4 to predict the expected number of times a lizard would be seen. Interpret the model result in terms of habitat niches of each of the two species. Note that all predictors are categorical. Consider developing one model using species as a factor predictor.