[R-sig-ME] Including an offset in a binomial GLM/GLMM
Baldwin, Jim -FS
jbaldwin at fs.fed.us
Tue Aug 14 15:15:14 CEST 2012
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).
Pacific Southwest Research Station
USDA Forest Service
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
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,
[[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