I've run across a peculiar issue that I can't seem to wrap my head around:
In animal ecology, it is common to measure group sizes (number of animals per observed cluster of animals) in relation to environmental parameters. More precisely, it is common to observe parts of an area and record the number of animals and the number of groups therein to calculate average group sizes per location (which might lead to 0 groups and thus a group's size of 0 for a given location).
A typical dataset looks like this (using R syntax):
I <- c(0,5,2,3,0) # number of observed animals in cluster G <- c(0,1,2,2,0) # number of clusters (groups) observed x <- c(1,2,4,7,3) y <- c(2,2,3,3,4) data <- data.frame(I,G,x,y) # data.frame, also containing additional covars but irrelevant to the question data$gs <- 0 # set up the group size data$gs[data$G>0]<-data$I[data$G>0]/data$G[data$G>0] #calculate the group size
However, these are rarely used as response variables in subsequent modeling approaches (see for example Distance sampling methodology, https://en.wikipedia.org/wiki/Distance_sampling). In my very exotic setup, I am modeling the group size in relation to the location using generalized additive models (mgcv package). My initial approach was (the actual dataset contains > 10000 records):
# I is number of animals per group per location (x,y) # G is number of groups per location (x,y) gam(I ~ s(x,y), offset=log(G+0.0001), family = quasipoisson, data = data)
I'm considering the number of animals per group I as a Poisson process that is offset by the number of groups G (which would be valid if I and G were independent vars). But as expected, this does give weird predictions when G is near 0.
I have since tried to wrap my head around how to model this - I'm confused by the fact that I and G are dependant variables, and their ratio (group size) can never be between 0 and 1. It's either 0 or larger than 1. All of the literature I found was dealing with ratios between 0 and 1 and I couldn't apply the suggestions to my specific problem. As an additional caveat, I am bound to additive models for this part of our study.
I would be very happy to hear any suggestions or thoughts that you might have!