[R-sig-ME] glmer.nb offset problem

Dagmar Ramgad82 at gmx.net
Tue Jul 25 17:52:11 CEST 2017


Dear all,

I am having a problem with a negative binomial GLMM using an offset.

I have GPS fixes from animals and calculated their homerange. Now I want 
to test if there are differences in the size of the homeranges between 
seasons of the year.

I did a simple linear regression analysis between size of home range and 
sample size (number of GPS fixes) and unfortunately found a slight 
positive relationship: The bigger my samle size the larger is the 
homerange. That is why I thought to use sample size as an offset in my 
negative binomial glmm.

My code is:

glmer.nb (Homerangearea ~SeasonOfYear 
+(1|AnimalID)+offset(log(NumberOfGPSfixes)), data=mydataframe)

Without an offset I get a wonderful result with totaly nice fitted 
values. My problem is: When I include the offset my fitted values go 
towards 0. Why is that?

The number of GPS fixes is very different between animals. In one case I 
do only have 60 fixes, in another case I do have 12800. Maybe this 
difference is too big? I do not totally understand what the offset is 
doing to the data. As far as I understood it adds some weighting to some 
data. Is that correct?

In other examples which I found online an offset is only used for small 
numbers. Or is an offset even not the right tool for my problem?

Help would be very much (!!) appreciated.

Tagmarie



More information about the R-sig-mixed-models mailing list