occuMulti Interpretation

665 views
Skip to first unread message

Alissa Anderson

unread,
Apr 5, 2021, 10:14:01 PM4/5/21
to unmarked

Greetings,

First off thanks to everyone who has asked and answered questions! Past conversations have been very helpful for me getting started with occuMulti. Sorry if this is a silly question, I'm new to multi species models and while I have spent a few days reading up on occuMulti and the Rota model but am still very much a novice (and have difficulty understanding all the equations) and have not yet found any clear examples of how to interpret the interaction estimate and am seeking clarification.

The occuMulti output lists the interaction of species1:species2 as an estimate. Ignoring p-value and confidence intervals for the sake of simplicity, if the estimate is positive does that means species 1 has a positive effect on species 2? I realize in the Rota model there is no assumption of dominance, if I want to know if species 1 is positively/negatively affected by species 2 do I need to change the order of what species goes first in y and the state/detection formulas?

Thank you,
Alissa


Ken Kellner

unread,
Apr 6, 2021, 2:04:31 PM4/6/21
to unmarked
Hi Alissa,

The order of the species doesn't matter - if you change the order of the species you will get the same estimates. If the estimate of species1:species2 intercept is positive, then species 1 has greater occupancy probability at sites occupied by species 2. The reverse is also true: species 2 has greater occupancy at sites occupied by species 1. It might be more helpful to think about the value of the parameter it this way: are species 1 and 2 likely to occupy the same sites (species1:species 2 positive), different sites (species1:species2 negative), or be independent of each other (species1:species2 = 0)?

Ken

Alissa Anderson

unread,
Apr 7, 2021, 11:13:31 AM4/7/21
to unmarked
Hi Ken,

Thank you for your clear and thoughtful answer! This makes much more sense to me now. I appreciate the effort you give to answering all our questions.

Cheers,
Alissa

Carla Mere

unread,
Mar 9, 2022, 10:06:40 AM3/9/22
to unmarked
One quick question, are these interpretations the same if the p-values are non-significant (p>0.05)? or non-significant interactions indicate that there are independent of each other no matter the positive or negative estimate values?

Thank you very much!

Ken Kellner

unread,
Mar 9, 2022, 4:51:03 PM3/9/22
to unmarked
I would interpret a non-significant interaction to mean there is no evidence from the model that the two species are either more or less likely to occupy the same sites, regardless of the sign or magnitude of the estimate. Of course this conclusion is based on the use of traditional significance testing. There's nothing stopping you from using a different alpha or e.g. not using the p-value at all and instead using a 95% CI, and making conclusions based on that instead.

Haqiq Rahmani

unread,
Mar 10, 2022, 7:00:07 AM3/10/22
to unma...@googlegroups.com
Hello everyone, 

I would like to conduct predator/prey multispecies occupancy model with site coveriates (elevation and distance to village) and observation covariate (potentially distance to village). I have multiple years of camera data, and I am planning to also see the variations in summer/winter detection probability which adds another observation covariate. 

I would like to know if someone did something similar and have some R code to share. 

Actually, I not sure how to build the unmarkedFrame and how to format occupancy and detection covariate to the multispecies occupancy. 

Also, how can I use the multiple years of detection history? I am planning to use Rota et al. 2016 which is a single season multispecies model. If I do so, how would the multiple years of data help me? 

Many thanks for helping out with this in advance. 

Regards 
Haqiq Rahmani 
PhD candidate 
Wildlife ecology and conservation 
University of Florida 


--
Sent from my iPhone

Carla Mere

unread,
Mar 10, 2022, 3:58:07 PM3/10/22
to unmarked
Thank you very much, Ken. One more quick question. When I look at the CI they seem too wide and I wonder if this indicate that something is wrong with the model. 

> head(cryvar_nocrybar) 
  Predicted        SE        lower upper crybar_status cov_value
1 0.9959634 0.4956184 3.672253e-39     1 crybar absent  236.0000
2 0.9962027 0.4960222 2.278936e-38     1 crybar absent  236.8081
3 0.9964280 0.4961925 1.415699e-37     1 crybar absent  237.6162
4 0.9966399 0.4961348 8.801825e-37     1 crybar absent  238.4242
5 0.9968393 0.4958731 5.476127e-36     1 crybar absent  239.2323
6 0.9970268 0.4953705 3.408950e-35     1 crybar absent  240.0404

Ken Kellner

unread,
Mar 10, 2022, 4:20:10 PM3/10/22
to unmarked
Carla - yes, those predicted occupancy estimates look problematic. Hard to diagnose without seeing the model results but I am guessing you have some very large parameter estimates and/or SEs which may indicate optimization problems. I'd try simplifying your model structure to see if that improves things. Multispecies occupancy models are very data hungry and complex models may fail if you don't have a lot of data or there are only a small number of sites where species co-occur. If simplifying the model doesn't work, you might also take a look at this paper on penalized likelihood with multispecies models which can help in some situations:


Haqiq - I recently wrote a vignette for occuMulti which is not available on CRAN yet but you can see it here: '


Hopefully it helps you get started.


Carla Mere

unread,
Mar 11, 2022, 11:06:09 AM3/11/22
to unmarked
Thank you very much, Ken. I believe my problem is related to separation as stated in the paper you referred. I am trying to use the optimizePenalty function in unmarked to see if this helps but it doesn't seem to be a function within unmarked package. Any suggestion how to find this function? Thanks!
Install the latest version of this package by entering the following in R:
install.packages("remotes") remotes::install_github("rbchan/unmarked")

Haqiq Rahmani

unread,
Mar 12, 2022, 12:31:41 PM3/12/22
to unma...@googlegroups.com
Thanks Ken

Haqiq

--
You received this message because you are subscribed to the Google Groups "unmarked" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unmarked+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/unmarked/1086025d-5821-4007-af66-3ff4b38d70ecn%40googlegroups.com.

Haqiq Rahmani

unread,
Mar 20, 2022, 2:21:04 PM3/20/22
to unma...@googlegroups.com
Hi Ken, 

Many thanks for forwarding the vignette for occuMulti. It helped me a lot. I would like to do graphs on species marginal and conditional occupancy similar to those in Rota et al 2016 but I could not find their R script. Do you mind sharing similar codes? 

Also, as you are going to publish your work, I wanted to point out a sentence with missing words/vowels on page 2, please see attached. 

thanks, 
Haqiq
 
image.png
I would like to make similar graphs for my model 

On Thu, Mar 10, 2022 at 4:20 PM Ken Kellner <con...@kenkellner.com> wrote:

Ken Kellner

unread,
Mar 25, 2022, 12:37:21 PM3/25/22
to unmarked
Hi Haqiq,

Thanks for finding that error, I'll fix it.

I don't have code available for the figures in Rota 2016. However those figures are essentially just multi-panel ggplot2 versions of the plots in sections 2.7-2.9 of the vignette, so I'd start there.

Ken

Haqiq Rahmani

unread,
May 17, 2022, 2:11:22 PM5/17/22
to unma...@googlegroups.com
Hi Ken, 

Many thanks for your help and time discussing the unmarked methods. The method you sent helped me a lot. I was able to run occupancy models using the Rota etal. 2016 method. I have my final results and I was able to produce graphs for both interacting species (snow leopard and ibex) on marginal and conditional occupancies. 
Also, I was able to see the effects on covariates on each species occupancy and the interaction between them. Particularly how distance to village altered the occupancy of each species. And how distance to villages altered some of the relationship in the interaction between these species. For example, looking at snow leopard occupancy probabilities given ibex was present and when ibex was absent and how some of these relationships changed with distance to villages (when using the covariate as the f12 natural parameter).
Right now, I would like to use the results to generate distribution maps in GIS for each of the scenarios. I will need some help with that. I have very good skills in ArcGIS and QGIS but I am not sure how to use the final model output from unmarked for exporting to GIS. I see people building a grid and then map probabilities of site use. Could you please send me some instructions on that? Or alternatively we can meet if that's the best way you think we could address this. 
Please let me know what works for you. 
Thanks,
Haqiq

Ken Kellner

unread,
May 18, 2022, 7:23:44 AM5/18/22
to unmarked
Hi Haqiq,

The approach is 
(1) import a raster for each covariate into R using the 'raster' package and raster() function
(2) stack the rasters into a RasterStack using the stack() function, making sure the names of each raster in the stack exactly match the names of your covariates in the model 
(3) convert the RasterStack into a data frame using as.data.frame()
(4) use this data frame as the newdata for predict()
(5) Convert the resulting prediction data frame back into a raster of the same extent using rasterFromXYZ()

See this thread, especially the answer from Chris Sutherland, for more details: https://groups.google.com/g/unmarked/c/QTPK3ujKVEc/m/j5x4jRYWJwcJ

Most unmarked functions can do steps 3-5 for you automatically, but unfortunately with occuMulti you have to do them manually.

Ken

Reply all
Reply to author
Forward
0 new messages