Multi species, multi season Occupancy (stMsPGOcc)

21 views
Skip to first unread message

Shagun Thakur

unread,
Apr 22, 2026, 6:05:15 AMApr 22
to spocc-spa...@googlegroups.com

Dear Jeff and all

I hope you all are doing well.

I am currently working on a multi-species, multi-season occupancy model using camera trap data following your framework. I wanted your help on a few aspects of structuring the detection data, particularly regarding effort and temporal design.

First, regarding trap effort: I have camera trap data where effort is summarized as trap nights per site and season. In constructing detection histories, I used this information to distinguish between true non-detections (0, when trap nights > 0) and missing observations (NA, when no effort was recorded). I wanted to confirm whether this is the correct approach?

Second, my sampling effort varies across sites and seasons, resulting in unequal numbers of occasions (weekly intervals) per site-season combination. I currently allow the number of occasions to vary and use NA to represent periods without sampling. Is this an appropriate way to handle unbalanced sampling effort in a multi-season occupancy framework?

Third, My winter seasons span two calendar years (November–March), and I have treated each as a single primary period (e.g., “winter_2022_23, then summer 2023 then winter 2023_24 etc.”). Is this an appropriate way to define primary periods in a multi-season occupancy model?

Finally, I encountered issues earlier due to mismatches between site identifiers in detection and effort datasets, which led to inflated NA values. After standardizing site names, the detection matrix now contains mostly 0s and 1s with relatively few NAs corresponding to true lack of sampling. I would appreciate your confirmation that this structure is appropriate for model fitting.

Any guidance or suggestions you may have on these points would be extremely helpful.

Thanks

Shagun 


Jeffrey Doser

unread,
Apr 24, 2026, 3:59:26 PMApr 24
to Shagun Thakur, spocc-spa...@googlegroups.com
Hi Shagun, 

Thanks for the message, and hope all is well. Based on everything you said, I think you have set the data up correctly. 
  1. Yes, makes sense to me. 
  2. Yes, this is the appropriate way to handle unbalanced data. 
  3. This sounds reasonable to me. Exactly how you define what a primary period is relative to a secondary period is a combination of your design and characteristics of the species you're trying to model, which altogether is tied to the closure assumption. 
  4. Yes, that structure is correct. 
Seems like you're on the right path!

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/CALvd8d46xBiTO2xHrLkV14mMrXR9yY7YQbPgm_h9rJ37%3DODgEQ%40mail.gmail.com.


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

Shagun Thakur

unread,
Apr 26, 2026, 4:52:20 AMApr 26
to Jeffrey Doser, spocc-spa...@googlegroups.com

Dear Jeff,

I wanted to share an update on the multi-species spatio-temporal occupancy model,

I am currently fitting the following model:

model <- stMsPGOcc (
occ.formula = ~ elev + human + livestock + dog + season,
det.formula = ~ trap_nights,
data = data_list,
cov.model = "exponential",
NNGP = TRUE,
n.neighbors = 15,
n.factors = 2,
n.batch = 800,
batch.length = 25,
n.burn = 10000,
n.thin = 10,
n.chains = 3,
ar1 = TRUE
)

The model runs successfully and most parameters show good convergence (Rhat ≈ 1.0), including detection, disturbance covariates, and temporal parameters.

However, I am consistently observing poor convergence for the spatial decay parameters (φ), with Rhat values > 1.4–2 and very low ESS. 

----------------------------------------
	Spatio-temporal Covariance: 
----------------------------------------
                                        Mean         SD    2.5%        50%      97.5%   Rhat  ESS
phi-1                               326.5901  2693.5370  5.3351    11.1080    39.4270 2.2814  104 

phi-2 14711.1162 11656.2718 8.4025 13832.6595 35062.1355 1.4311 32

This persists even after:

1.increasing MCMC effort substantially

2.reducing latent factors (from 4 to 2) 

3.including additional covariates (human, livestock, dog) to explain spatial variation

I wanted to ask how shall I proceed in this situation?


Thanks again

Shagun 


Jeffrey Doser

unread,
Apr 29, 2026, 3:41:59 AM (12 days ago) Apr 29
to Shagun Thakur, spocc-spa...@googlegroups.com
Hi Shagun, 

These parameters are notoriously challenging to get to converge. I would consider exploring the MCMC traceplots of the phi parameters as well as the factor loadings (lambda) to get a sense of what their MCMC chains look like, which can often give more information than just the single metric that Rhat provides. Depending on how your sampling locations were distributed (e.g., random sample vs. systematic sample vs. cluster sample) you may want to specify a more informative prior distribution than the default that spOccupancy specifies. If you have some data points particularly close together in space, than the default prior for phi may be so wide that it is challenging for the model to successfully converge. See this section of one of the package vignettes which discusses how to go about doing this. 

Jeff
Reply all
Reply to author
Forward
0 new messages