Skip to main content
edited tags; edited title
Link
amoeba
  • 107.2k
  • 36
  • 321
  • 346

Fitting a binomial glmer or an lmerGLMM (glmer) to a proportional response variable that is a proportion or fraction

edited tags; edited title
Link
amoeba
  • 107.2k
  • 36
  • 321
  • 346

fitting Fitting a binomial glmer or an lmer to a proportional response variable

added 4 characters in body
Source Link
Ben Bolker
  • 47.3k
  • 3
  • 130
  • 181

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.

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)

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.

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)

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.

added 44 characters in body
Source Link
Ben Bolker
  • 47.3k
  • 3
  • 130
  • 181
Loading
Source Link
ALs
  • 377
  • 1
  • 2
  • 6
Loading