extracting psi samples

20 views
Skip to first unread message

annie finneran

unread,
Mar 17, 2026, 5:41:18 PMMar 17
to spOccupancy and spAbundance users
Hello,
I am trying to access occurrence probability values (psi.samples) from multi-species single-season model (msPGOcc). I want to get an average occurrence probability for each species (n=14)
at each site (n=27) from my model. I am confused about how to correctly pull these values
and calculate the mean, as I saw some examples in this google group but they were from different functions. Can I do the following? apply(model_1$psi.samples, c(2,3), mean)

The result of running that is a matrix with probabilities where nrow=number of species and ncol=number of sites. On the surface this is how I want the data to look for my next analysis, but I am not certain the means were calculated correctly or how to check that.

Also, is it safe to assume that this matrix is in the same order as the species and sites were put into the model? I want to label each occurrence probability accordingly. 

Thank you! 

Annie

Jeffrey Doser

unread,
Mar 22, 2026, 3:21:12 PM (9 days ago) Mar 22
to annie finneran, spOccupancy and spAbundance users
Hi Annie, 

Sorry for the delay. Yes, your code there will extract the average occupancy estimate for each species at each site. The order of the species and sites will be exactly the same as what you put into the model. 

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/c4538ad5-b6fe-4224-b230-a83faf3ecaa3n%40googlegroups.com.


--
Jeffrey W. Doser, Ph.D.
Assistant Professor
Department of Forestry and Environmental Resources
North Carolina State University
Pronouns: he/him/his
Reply all
Reply to author
Forward
0 new messages