GLMM binomial data clarification of model

HI I am running a project on shrew presence 1=yes 0=no and categorical data (i.e. bankside management as: "none", "occasional", "frequent", "grazing", water flow: as "slow", "fast", "static") across 25 sites and assessed 1-2 times per month from april to june. I have also calculated the BMWP (a macroinvertebrate diversity score) at each of the sites.

I am using a binomial GLMM and I have the coded:

o <- glmer(shrew.present ~ water.flow + + BMWP + (month|site),, family=binomial(link="logit"))
p <- glmer(shrew.present ~ water.flow + + BMWP + (1|site),, family=binomial(link="logit"))
model o has a lower AIC value so is therefore the better model
I have tested if BMWP is quadratic which it isn't.

I was wondering if I have done the right thing here or if there is anything that I have not considered when running a binomial GLMM which I should have?

Will the results from the GLMM for model "o" be sufficient to record on a scientific write up? any help or pointers would be greatly appreciated :blush:

Hi, welcome!

The biggest concern is linked to the 0 (absences). How trust-able are they? I assume you have been doing some trapping (or setting up camera traps). if so, that's the biggest weakness of your approach.
If you cannot guarantee that the zeros are true/real zeros, It would then be more robust to fit occupancy models, as they will deal with imperfect detection. You can use either days of trapping or (and) traps as replicated samples to shape the data for occupancy analysis. there is a big bunch of scientific literature about these methods (search in journals like Ecology, Methods in ecology and evolution, or by authors like Andy Royle...) and there is a package in R that can fits models like dynamic occupancy models that would probably best suite you (These models i normally fit them with jags, but you can do them with unmarked). It is called unmarked. it includes quite a few vignettes too :).

good luck

1 Like


Thank you so much for your guidance. I have since found a paper that models species occurrence surveys as this seems to be something that I should definitely do.
I used the bait tube method for surveying which involves faecal collection every two to three weeks for analysis so there is the big problem of false negatives in my data set!
I have been looking at using the unmarked package but I am having an issue in how I should format my data in excel so I am having a research and look into this but if you have any more pointers I would love to hear!

1 Like

Hi back.
I am not sure how do you store the data, but if you have a way to do it in excell, I would say do the modifications inside R.
The data structure for occupancy models is the same used in capture recapture, but rather than individuals, each row represents a station, location etc... so it should looks something like

site_1 00010010011 + categorical covs
site_2 10000010000 + ...
site_3 00000000000 + ...

something like:

Data <- data.frame(site = c('site_1', 'site_2'),
                                occu = c('00011000', '10000000'),
                                bankside = c('none','occasional'),
                                stringsAsFactors = FALSE)

So the detection histories are in the same variable pooled (pasted), each 0-1 means detection-non detection for a given site in a given sampling period. I am not sure if unmarked has any function to manage formats, but package marked certainly has (or had). The exact format will probably depend on the model to be fitted.

I think you can get friendly details (and examples of fitted models using excel) at Terry Donovan's companion website to the occupancy book

I am curious, you DNA analyze the scats for getting the species id or just pool all shrew scats? I spent some years monitoring small mammal communities (voles, lemmings and shrews) using multi-method occupancy modelling, that's why I am curious :smiley:
cheers (feel free to ask anything, I may be of help)

BTW, edit to add that you mentioned you found one paper... This is the link for the first paper developing these family of methods (there was a similar paper around that time by Drew Tyre dealing with imperfect detection, a cool one, but didn't get the attention it deserved at that time):
Great advance from the guys of Patuxent (I reckon Darryl was there at that time). There are hundreds of papers about this topic, and approaches to expand them (I hope soon will get published one regarding non random distribution of false positives as part of my old work with the "arctic mice").
I have check the MARK book, and there is chapters regarding occupancy. I have not read them, but a lot of other chapters of the book, and I reckon it could be also the best introduction regarding occupancy modelling. It refers to software MARK, that fit capture-recapture but also occupancy models. You can use MARK as standalone software (in windows or under wine), or rather, call it from R with package RMark.
that's the link for the MARK book:
Just select chapter 21 from the smallish menu :slight_smile:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.