ubms N-mixture modelling help

350 views
Skip to first unread message

João Manuel Cordeiro Vale Pereira

unread,
Mar 6, 2024, 11:58:13 AM3/6/24
to unmarked

Hi everyone,

I am working on a series of binomial N-mixture models for single bird species, with package ubms, linking their abundances with a set of covariates describing forest structure and management. The data I am using covers 6 years of point count surveys, 135 plots and up to 3 visits to each plot each year (but quite often less than that). My focus is on the effects of the covariates and not on how abundance varies across years, so I am using the “stacked” approach (https://kenkellner.com/ubms/articles/random-effects.html) and including a random effect of the year.

I managed to get all models running and converging, but on examining the diagnostics some issues came up:

- The posterior predictive p-value for many of the species is either very close to 1 or very close to 0. As far as I understood, the first case may reflect underdispersed residuals and overfitting, but I tried running a much simpler model for one of the species, only containing the most important covariates, and the situation remains the same.

- In the second case (close to 0), this should reflect overdispersed residuals but I am surprised that happens in a model that already contains a random effect. I tried including an observation-level random effect to absorb that extra dispersion, but I could not get the model to converge;

- For most species, the apparent detection probability (maximum observed counts divided by estimated abundance) is suspiciously low (around 10% or below), and abundance estimates look a bit too high, though not crazily so. Besides, if I use the function plot_residuals for the detection part of the model, the residuals seem to have a rising trend. I tried changing the priors of the detection model to “push” the intercept away from extreme values, but this barely had any effect.

I am a bit lost as to how to address these issues, after trying to tinker with the models for a while. I am also relatively new to hierarchical models and Bayesian approaches. If this was a regular GLM, I would have gone for a quasipoisson (in case of underdispersion) or negative binomial (in case of overdispersion) model. I’d be very thankful for any insights or suggestions!

Ken Kellner

unread,
Mar 9, 2024, 11:11:20 AM3/9/24
to unmarked
This is a pretty common problem with N-mixture models, with typically no easy solution (at least that I've seen). I'm a bit surprised the obs-level random effect had issues converging: maybe try fitting the model in nimble or JAGS instead?

You can use a negative binomial (or zero-inflated poisson) for the abundance part of the model. ubms does not support this, but unmarked does. You could try it in unmarked and see if that seems to help (using, e.g., AICcmodavg::Nmix.gof.test() for fit tests instead). pcount() in unmarked does support random effects, but I expect if it has been a challenge to get random effects working in ubms you are unlikely to get better results with unmarked.

There seems to be a frequent issue of "good fit/bad prediction" with these models where negative binomial models seem to fit better but give unrealistic predictions. There's a good discussion of this in the AHM book vol 1, section 6.9.5.

Ken

João Manuel Cordeiro Vale Pereira

unread,
Mar 11, 2024, 1:07:21 PM3/11/24
to unmarked
Hi Ken,

Thanks for the suggestions! I will try running some of the most problematic models in unmarked and see what comes up. A few days ago I also came across a quite recent R package called spAbundance (https://www.jeffdoser.com/files/spabundance-web/), and I will be trying out to fit the models there too. That package allows inclusion of random effects and also of negative binomial link functions for abundance.

Reply all
Reply to author
Forward
0 new messages