Summary for occurrence distributions

315 views
Skip to first unread message

Chris Ward

unread,
Aug 1, 2018, 3:07:16 PM8/1/18
to ctmm R user group
Hi all,

I'm trying to get similar summary information as from AKDEs but for occurrence distributions (ODs). The summary() command when used with an OD shows errors like so:

> occur_summary_1_90 <- summary(OCCUR.85046, level.UD = 0.90, level = 0.95)
Error in if (any(I)) { : missing value where TRUE/FALSE needed

.. and when trying to use summary.UD():

> occur_summary_1_90 <- summary.UD(OCCUR.85046, level.UD = 0.90, level = 0.95)
Error in summary.UD(OCCUR.85046, level.UD = 0.9, level = 0.95) : 
  could not find function "summary.UD"

This isn't the biggest deal, as I've exported my rasters and shapefiles for ArcGIS already and am proficient enough with ArcGIS to do what I'd like, but I was just wondering:

1) Is my inability to use summary() for ODs on purpose, or is there a problem with my code/R/ctmm package?

2) Does it make sense to get 50/90 contours, or any "area" calculation, for ODs? My thoughts are that since it's only giving an estimate of where the animal may have been able to go between locations, perhaps an area estimate is unnecessary.

Thanks for any feedback!

Chris


Christen Fleming

unread,
Aug 2, 2018, 4:40:35 PM8/2/18
to ctmm R user group
Hi Chris,

I never coded a summary method for occurrence distributions because their coverage areas reflect our ignorance of where the animal was (which is sampling dependent) more than they reflect some biology that can be compared between individuals. Usually, in the literature, when people are calculating things like Brownian-bridge "home-range" areas, they are conflating occurrence distributions with range distributions.

  • I should code summary.UD() to say something to this effect instead of just not working.
  • The way to force summary() to resolve to summary.UD() would be ctmm:::summary.UD()... that isn't going to help here, though.
  • I don't know what you are doing in your analysis, but its likely that you don't want to be using occurrence areas. Feel free to submit questions about that.

Best,
Chris

Chris Ward

unread,
Aug 2, 2018, 5:03:44 PM8/2/18
to ctmm R user group
Hi Chris,

Thanks for the quick response. That's exactly what I was thinking, but wasn't able to put that into words well enough. 

I'm looking at habitat use of a small songbird in northern New Brunswick, Canada. This habitat is patchy due to intense forestry, with some forestry blocks smaller than half a hectare; the individuals I have calculated home ranges for have HRs ranging from 5-15 hectares, so they encompass several different types of forest blocks. I'd like to identify importance of blocks (ie forest types). I was initially going to record what type of habitat each of my locations were in within the device error, but then thought that perhaps using an OD would give further information. Reading your response to my first question, it seems to me that this might not be a good idea and perhaps I should stick with just looking at what habitat is inside their home ranges...

I have shown "Individual x has #% of forest block A, #% of forest block B, etc within their home range," but whether those blocks are important is what I'm trying to tease out. Any input would be greatly appreciated! 

TIA!

Chris

Christen Fleming

unread,
Aug 3, 2018, 10:29:54 AM8/3/18
to ctmm R user group
Hi Chris,

With the occurrence distribution, you can directly obtain point estimates for what covariates the individual sampled during observation, but not with the contours. You take the PMF of the occurrence distribution and add up the probability mass within a certain habitat type to get the fraction of time spent in that habitat type. This is less safe to calculate with the KDE range estimate, which is extrapolating space use and not habitat use, however the occurrence distribution may not be representative of long-term habitat use.

Best,
Chris

Chris Ward

unread,
Aug 7, 2018, 10:00:26 AM8/7/18
to ctmm R user group
Thanks a lot for the feedback, Chris! I will try that this week. 

All the best,

Chris

Chris Ward

unread,
Aug 11, 2018, 11:10:04 AM8/11/18
to ctmm R user group
Hi Chris, 

I'm getting the error "Error in `[<-`(`*tmp*`, 1, , value = TRUE) : subscript out of bounds" when running the occurrence function on some of my individuals. In some cases individuals are only tracked for one day (~40 locations) as I'm splitting their spatial analysis by breeding behaviour. I've attached an extreme case of this with my script. Any help would be greatly appreciated!

Chris

tele.85023.2017.2 <- as.telemetry(data.f.85023.2017.2)
GUESS.85023.2017.2 <- ctmm.guess(tele.85023.2017.2, interactive=FALSE)
FIT.85023.2017.2 <- ctmm.fit(tele.85023.2017.2, CTMM=GUESS.85023.2017.2, method="pHREML")
SELECT.85023.2017.2 <- ctmm.select(tele.85023.2017.2, GUESS.85023.2017.2, verbose=FALSE, level=0.95, IC="AICc", trace=FALSE)
OCCUR.85023.2017.2 <- occurrence(tele.85023.2017.2, SELECT.85023.2017.2)
Error in `[<-`(`*tmp*`, 1, , value = TRUE) : subscript out of bounds
example_indiv85023_behav2.csv

Christen Fleming

unread,
Aug 13, 2018, 6:25:39 PM8/13/18
to ctmm R user group
Hi Chris,

I get an IID model as the selected model and you can't formulate an occurrence distribution with an IID model... at least not beyond the ordinary empirical distribution if you don't have HDOP values. I could code occurrence() to return something useful for IID data if you had HDOP or error columns recorded.

Best,
Chris

Christen Fleming

unread,
Sep 16, 2018, 3:35:46 AM9/16/18
to ctmm R user group
occurrence() now works on IID data (Github master branch), though the default spatial resolution is a bit low.

Chris Ward

unread,
Oct 31, 2018, 2:23:27 PM10/31/18
to ctmm R user group
Hi Chris,

Thanks for that. I will try it out next week when I return to looking at ODs with that data. 

Chris
Reply all
Reply to author
Forward
0 new messages