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

Ben Bolker bbolker at gmail.com
Tue Jul 25 19:14:21 CEST 2017


  I suspect that the problem is that your fitted (predicted) values
are now being calibrated for an animal with a *single* fix (i.e. an
offset of zero).  Try multiplying your fitted values by a "typical"
number of fixes to see if the answers are reasonable.

  This strategy does worry me a little bit because it implies that the
home range is *strictly proportional* to the number of fixes.  It
might be slightly better to use log(NumberofGPSfixes) as a predictor
rather than an offset, which will correspond to assuming that the
homerange size is proportional to a NumberofGPSfixes^b, where b is not
necessarily 1. (I would guess b<1, which means that the relationship
will be decelerating. It still implies that the homerange increases to
infinity as the number of GPS fixes increases to infinity (rather than
reaching an asymptote), but the results might not be too bad.)

See https://stats.stackexchange.com/questions/237963/how-to-formulate-the-offset-of-a-glm
for a little more discussion of offsets.

On Tue, Jul 25, 2017 at 11:52 AM, Dagmar <Ramgad82 at gmx.net> wrote:
> 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
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



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