I'm hoping somebody can help with what I think is a relatively simple question, and I think I know the answer but without confirmation it has become something I just can't be certain of.
I have some count data as a response variable and I want to measure how that variable changes with the proportional presence of something.
In more detail, the response variable is counts of the presence of an insect species in a number of sites, so for example a site is sampled 10 times and this species may occur 4 times.
I want to see if this correlates with the proportional presence of a group of plant species in the overall commmunity of plants at these sites.
This means my data looks as follows (this is just an example)
Site, insectCount, NumberOfInsectSamples, ProportionalPlantGroupPresence
1, 5, 10, 0.5
2, 3, 10, 0.3
3, 7, 9, 0.6
4, 0, 9, 0.1
The data also includes a random effect for location.
I thought of two methods, one would be an linear model (lmer
) with the insects converted to a proportion e.g.
lmer.model<-lmer(insectCount/NumberOfInsectSamples~ ProportionalPlantGroupPresence+(1|Location),data=Data)
lmer.model<-lmer(insectCount/NumberOfInsectSamples~
ProportionalPlantGroupPresence+(1|Location),data=Data)
The second would be a binomial GLMM (glmer
)
e.g.
glmer.model <- glmer(cbind(insectCount,NumberOfInsectSamples-insectCount)~
ProportionalPlantGroupPresence+(1|Location),
data=Data,family="binomial")
I believe the binomial glmer to be the correct method, however they produce fairly different results. I cant seem to find a definitive answer on the net without still feeling slightly uncertain, and wish to make sure I am not making a mistake.
Any help or insight into alternative methods on this would be much appreciated.