Hi all,
I’m working on a project modeling native bumblebee abundance, and I’m running into some convergence issues with sfMsAbund. I wanted to ask for advice from people with more experience fitting the spatial version of the model.
We’re modeling counts of five Bombus species with very unbalanced abundances (one species with >6000 captures and the rarest with only 13).
We have 196 sites, each operating an average of ~14 days. Sites were not active at the same time, and distances between them range from 0.17 m to >60 km.
Our goal is to predict species abundances using six environmental variables.
I first fit an msAbund model with a negative binomial distribution and included month as a random intercept. This model converged well and passed posterior predictive checks. After that, I fitted an lfMsAbund model with 2 latent factors, which had better predictive performance based on WAIC. Again, convergence looked good.
As a final step, I fit an sfMsAbund model to account for possible spatial dependence due to the sampling design. In this model, most parameters converge, but a few do not (e.g., kappa for one species has Rhat ~3.1).
I tried reordering species and inspecting single-chain diagnostics, but nothing seems to fix the issue.
Since every attempt takes several hours to run, I would really appreciate some guidance:
Is this a common issue when species abundances are extremely unbalanced?
(One dominant species + several rare ones.)
Should I consider removing the species with only 13 captures?
Could the covariance function affect convergence?
I used the default (exponential), but is there any practical reason to prefer another function if I do not expect long-distance spatial correlation?
About the phi prior (phi.unif)
If I don’t expect long-range spatial dependence, should I tighten the prior?
For example, would something like this be appropriate?
Or am I misunderstanding how to set reasonable priors for the spatial decay parameter?
Any general tips for improving convergence in sfMsAbund?
I’m still fairly new to spatial msAbund models, so any guidance or recommended readings would be very helpful.
I can share the full summary, code, or data structure if needed.
Thanks in advance for any help!!
Best,
Gabriel
--
You received this message because you are subscribed to the Google Groups "spOccupancy and spAbundance users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spocc-spabund-u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/spocc-spabund-users/f190fca3-9d77-455b-855b-8219eb1f034en%40googlegroups.com.
Hi Jeff,
Thank you very much for your previous response.
Before keeping trying with the spatial models, I decided to explicitly explore the spatial scale of the residual dependence, instead of assuming it based only on trap spacing. My question for you is whether the way I defined residuals and the reasoning I am following is appropriate for lfMsAbund models.
Since the model is a multivariate negative-binomial GLMM, I defined Pearson residuals using the usual NB formula:
where and come from the posterior samples.
Below is the R code I used:
# Observed counts: [species, site] y_obs <- drop(lf_fit$y) # Posterior means of mu and kappa mu_hat <- apply(lf_fit$mu.samples, c(2, 3), mean) # [species, site] kappa_hat <- apply(lf_fit$kappa.samples, 2, mean) # [species] # Negative-binomial variance var_hat <- matrix(NA, nrow(mu_hat), ncol(mu_hat)) for (i in 1:nrow(mu_hat)) { mu_i <- mu_hat[i, ] kappa_i <- kappa_hat[i] var_hat[i, ] <- mu_i + (mu_i^2) / kappa_i } # Pearson residuals pearson_res <- (y_obs - mu_hat) / sqrt(var_hat) Using these Pearson residuals, I calculated spline-based correlograms (bootstrap = 999) for each species. Four species show essentially no residual spatial structure. One species (B. pensylvanicus) shows a small peak of correlation (~0.5) at distances < 100 m, but it decays immediately and bands are wide.
Given these results, my interpretation is that the remaining spatial dependence is minimal and confined to a scale so small that the latent factor model likely absorbs the relevant shared structure,
and therefore a spatial factor model would probably not change the parameter estimates in any meaningful way (consistent with what you mentioned).
Before moving forward, I wanted to check with you if my procedure (defining Pearson residuals in this way) and my reasoning are appropriate for
lfMsAbund.Thank you again for your time. Your guidance has been incredibly helpful. Regards, Gabriel.
Postdoctoral Research Associate - Arthur Temple College of Forestry and Agriculture, Stephen F. Austin State University, U.S.
M.Sc.and Ph.D - Instituto de Ecología A.C., Mexico
Biologist - Universidad Nacional de Colombia, Colombia
Nacogdoches, Texas