[R-sig-ME] Including an offset in a binomial GLM/GLMM

Baldwin, Jim -FS jbaldwin at fs.fed.us
Mon Aug 20 06:42:11 CEST 2012


If "a*b+c" (as you show below) is an effect of some experimental design (treatments for instance or availability of some desired habitat feature) that affects the probability of presence of a critter and trap nights is more of a measure of "human sampling effort" unrelated to the animal presence, then I think you'd want to estimate both of those effects simultaneously in one analysis rather than in separate analyses.  (The effects of a, b, and c should be either free and clear of the measurement process or if that isn't possible, characterized for a standardized amount of effort.)

You might need to postulate a model of the relationship among the detection probabilities for different trap nights (assuming they don't vary by too much).  A simple (but not necessarily realistic model) might be that there is a probability p to detect the animal on a single trap night (given that it is available to be trapped).  If t consecutive trap nights are independent given that the animal is available to be trapped all t nights, then the probability of a detection would be 1 - (1-p)^t.

For this specific application r-sig-ecology at r-project.org might also be a place to look for suggestions.

Jim


-----Original Message-----
From: Leila Brook [mailto:leila.brook at my.jcu.edu.au] 
Sent: Sunday, August 19, 2012 5:58 PM
To: Baldwin, Jim -FS; r-sig-mixed-models at r-project.org
Subject: RE: Including an offset in a binomial GLM/GLMM

Dear Jim, 
Thanks for your suggestion about using unmarked. I was curious about whether the offset would be possible in a binary model, as it is generally only mentioned for a poisson, but there must be other cases where it would be beneficial for a binary response variable. 
I have looked at detection probability in a separate analysis and was hoping to use a GLM/M to look at presence/absence.
Thanks again,
Leila

________________________________________
From: Baldwin, Jim -FS [jbaldwin at fs.fed.us]
Sent: Tuesday, 14 August 2012 11:15 PM
To: Leila Brook; r-sig-mixed-models at r-project.org
Subject: RE: Including an offset in a binomial GLM/GLMM

If the probability of animal presence and the detection probability are both of interest, have you considered the unmarked package?  That package will allow (and is built for) accounting for variability in sampling effort (such as the number of trap nights).

Jim Baldwin
Pacific Southwest Research Station
USDA Forest Service

-----Original Message-----
From: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of Leila Brook
Sent: Monday, August 13, 2012 11:18 PM
To: r-sig-mixed-models at r-project.org
Subject: [R-sig-ME] Including an offset in a binomial GLM/GLMM

Dear all,

I apologise if this is an obvious question, but I haven't been able to find reference to it in the literature so far. I was wondering whether it is possible to include an offset variable in a binomial GLM/GLMM, as well as in poisson models?



For example, I surveyed for my study species during a set time period and collected presence-absence data. On some nights the camera traps failed, so the no. trap nights is reduced, which could then influence detection.

Hence I would like to include trap night as an offset.



However, if it is possible to include the trap nights as an offset in a binomial model with logit link function, is it alright to just include it as below:



model<- glm(pres ~ a*b + c, offset=trapnight, family=binomial, data=data)



Or would it need to be transformed as in Poisson models with a log link when included in the formula:

model<- glm(count ~ a*b + c + offset(log(trapnight), family=poisson, data=data)



In this case, would the transformation be "offset(logit(trapnight))" or "offset(invlogit(trapnight))"



Thank you for your help,

Leila

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models





This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately.



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