I have Count data with zeros, and I'd like to use a poisson GLM (or similar) to compare two groups. One group has all zeros, the other is count data ranging from 0-15.
Since one group has all zeros – I cant test it because variance is 0, but it seems obvious that the group which has regular presence is 'significantly different' to group which has no presence ever (If we assume that a 0 means not present rather than not sampled).
Apologies if the first line of code is not elegant - still learning..
dat = data.frame(x = rep(c("a","a","a","a","a","b","b","b","b","b"), times = 20), y = rep(c(0,0,0,0,0,7,3,0,1,4), times = 20)) fit = glm(y ~ x, dat, family = "poisson") summary(fit)
The results show p ~ 1
If I even add one value to group a, it becomes testable and highly significant.
dat$y = 2 fit = glm(y ~ x, dat, family = "poisson") summary(fit)
How can i show statistically that my two ORIGINAL groups are significantly different?
I know that zero-inflation models help where there are many zeroes, but I dont think it helps me here.