Random effects in spOccupancy

24 views
Skip to first unread message

Sarah Broadway

unread,
May 29, 2026, 7:56:20 AMMay 29
to spOccupancy and spAbundance users
Hello,

I am fitting multi-species occupancy models in spOccupancy and I am a bit confused about the language regarding random effects. Are random slopes and intercepts for species incorporated into the model?

Thank you,
Sarah

Jeffrey Doser

unread,
May 29, 2026, 8:27:40 AMMay 29
to Sarah Broadway, spOccupancy and spAbundance users
Hi Sarah, 

Yes, for multi-species occupancy models, there are automatically random intercepts and slopes by species. In other words, each species has its own individual intercept and slope, and these species-level effects are random effects where the effects are drawn from a normal distribution with an overall mean (community-wide average) and variance (variance in the effects across species in the community).

Jeff

--
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/08a900bb-f6f3-43d4-b950-88d70083799en%40googlegroups.com.


--
Jeffrey W. Doser, Ph.D.
Assistant Professor
Department of Forestry and Environmental Resources
North Carolina State University
Pronouns: he/him/his

Mohamad Nur-hafizuddin Abdullah Mohamad Norajame

unread,
May 29, 2026, 8:48:48 AMMay 29
to spOccupancy and spAbundance users
Hi Jeffrey,

I saw this discussion and I want to quickly ask regarding grouping species into communities for multi-species modeling. I find it quite difficult on how to select species to be included in the analysis. I read a paper about this: https://onlinelibrary.wiley.com/doi/full/10.1002/ece3.72315. To my understanding, we need to include species that responds similarly to covariates in the model. 

I did ran the model with a group of primates species and I found out that one of the occurrence covariates have high community variance. Does this mean that I need to check again the species that I included in the model? 

Kind regards,
Hafiz

Jeffrey Doser

unread,
Jun 2, 2026, 5:53:18 AMJun 2
to Mohamad Nur-hafizuddin Abdullah Mohamad Norajame, spOccupancy and spAbundance users
Hi Hafiz, 

I have not read the paper you linked to in depth, but whether you use a multi-species vs. multiple single-species models depends in large part on objectives as well as the characteristics of the species. The basic concept of a simple multi-species occupancy model (i.e., the one implemented by the msPGOcc function in spOccupancy) is that species-level effects are estimated as random effects from a common, community-level distribution. This assumes that species-level effects across the group of species included in the model can reasonably be assumed to be normally distributed around some community-wide average. If your community of species is not likely to meet this assumption, then you may consider using single-species models if you have enough data. Multi-species occupancy models provide improved precision at the risk of potentially lower accuracy for  certain species (e.g., particularly rare species or species that have vastly different covariate effects compared to the rest of the community). This sort of bias vs. precision tradeoff is a classic tradeoff in statistics. You do not need to only include species that respond similarly to covariates in a multi-species model. The large variance also does not imply that you need to rethink the species in the model. Again, the assumption of a multi-species model is that the species-level effects can be assumed to be normally distributed around some mean. If that is the case, it is perfectly feasible for there to be a large variation across species in the community. Instead of trying to follow some pre-specified rule, I would encourage you to consider the assumptions that go into the multi-species model and the implications this has on your inferences. If your primary interest is on interpreting the effects of some covariate on individual species and you expect some of these species to be vastly different from the majority of the species in the community, then you will likely be better off fitting a single-species model. If you are interested in both species-level effects, how these vary across the community of species, and perhaps also in predicting community-level patterns (e.g., richness, diversity), then multi-species models are likely the way to go. Here is another good paper on multi-species modeling that might be relevant as you think about this.

Hope that helps, 

Jeff

Reply all
Reply to author
Forward
0 new messages