Mean AKDE - Discrepancy in Grid size

29 views
Skip to first unread message

Samuel Shrimpton

unread,
Apr 30, 2024, 8:05:07 AMApr 30
to ctmm R user group
Hi all! 

I am in the process of calculating a mean AKDE for 21 individuals, that have significant and varying degrees of irregularity in their trajectories. I have tried to modularise the calculation of utilisation distributions to save memory (as I am running out of 128gb if I include a list of all telemetry and models to a single akde function). However I can see from the arguments and some of the other questions that the grid size is optimally calculated based on the list of ud objects included and so will vary between subsets of trajectories and will not be able to be handled by the mean() function. 

In which case, would specifying the dr to standardise grid size be the best way to proceed? And if so, what would you suggest as the best way to settle on an optimal grid size?

I appreciate that the ctmm team must be incredibly busy, so thank you for taking the time to help! 
Thank you! 
All the best! 
Sam  

Christen Fleming

unread,
May 1, 2024, 12:31:53 AMMay 1
to ctmm R user group
Hi Sam,

Rather than irregular sampling, this is probably stemming from extremely varying range sizes. I would make sure that all tracks reflect range residence. I would also make sure that you really want mean() and not pkde().

But the easiest solution is to change the default grid$dr.fn argument from min to something else, as detailed in help('akde').

best,
Chris

Samuel Shrimpton

unread,
May 1, 2024, 2:18:36 AMMay 1
to ctmm R user group
Dear Chris,

Thank you for such a quick and helpful response. 

As suggested, I have changed the grid argument to the following: grid = list(dr = c(191.9585, 217.8602), align.to.origin=TRUE), and I now have much faster run times, and the generated UD's are compatible with the mean function. I do receive the following warning messages and I am unsure why they are generated: 

Warning messages:
1: In do.call(data.frame, c(x, alis)) :
  unable to translate '<U+0394>AIC' to native encoding
2: In do.call(data.frame, c(x, alis)) :
  unable to translate '<U+0394>AIC' to native encoding

Any suggestions would be appreciated! 

As far as checking for residence, I have individuals that nest on multiple islands, that are in close proximity. Would you suggest calculating separate UD's by island?  

Thank you again!
Best wishes,
Sam 

Christen Fleming

unread,
May 8, 2024, 11:08:16 PMMay 8
to ctmm R user group
Hi Sam,

What OS and language are you running to get that warning? What do the AIC tables look like? Is the Delta character showing, or is it garbage? I'm on English Windows 10 and I thought it had the worst Unicode support.

I would suggest clustering around nests, and then combining the individual UDs with mean(...,sample=FALSE) if those are all of the nests.

Best,
Chris
Reply all
Reply to author
Forward
0 new messages