Solved – Using log-linear models for presence/absence data in wildlife

generalized linear modellog-linearr

I'm working on a project wherein I compare the presence/absence of a number of bird and herptile species between wetlands that have received three different treatments. The populations were surveyed across two different years. So the response variable is a binary categorical variable, and the predictor variables (wetland treatment and year of sampling) are also categorical.

The situation gets a bit more complicated in that different sampling schedules were used between the two years, resulting in different sample sizes between the two years. I'm looking at modeling animal presence/absence using the glm() function in R, but I'm not sure if there might be a more appropriate approach?

Best Answer

You can use the binomial GLM, as it provides the freedom to model different sample sizes, $m_i$. So, you can use glm() function as follows:

glm(cbind(presence, absence) ~ 1 + treatment + year, family=binomial)

where "presence" and "absence" show the number of present or absent cases.

Related Question