Raw probability density values for akde() output

134 views
Skip to first unread message

martin...@gmail.com

unread,
Feb 5, 2020, 11:44:43 AM2/5/20
to ctmm R user group
Hey Chris,

This is Martin Beal, we met last summer at the Animove Course. I hope you're well!

I am wondering if one can get access to the raw probability density values of the UD calculated with ctmm::akde(). In the default output of akde() the cell values are between 0-1, i.e. the "volume" values under the utilization distribution. I am wondering if there is a way to get the raw values, akin to the cell value output of adehabitatHR::kernelUD()? As I understand it, the akde() cell value output is more akin to the output one gets from adehabitatHR::getvolumeHR. 

Sorry if you're not familiar enough with how adehabitatHR works for this question to make sense! If so, I can explain in more detail. The context of this question is in trying to derive population-level ranges from a set of individual home ranges (i.e. using mean() ). 


Thanks a million,
Martin 

Christen Fleming

unread,
Feb 5, 2020, 10:13:19 PM2/5/20
to ctmm R user group
Olá Martin,

I am well. I hope you are doing well also.

Inside the UD object are slots PDF and CDF. The default plot is of the CDF, but you probably either want the PDF or the PMF. The PMF is just the PDF times the cell area, which is prod(UD$dr). There are export options to choose among these as well.

The mean() function is implemented for UD objects, if they are calculated on the same grid, but the resulting CIs are not yet propagated correctly.

Best,
Chris

martin...@gmail.com

unread,
Feb 6, 2020, 8:37:37 AM2/6/20
to ctmm R user group
Obrigado, Chris!

Which of these three values (PDF, CDF, and PMF) does mean() calculate the average UD with in ctmm? The reason I'm asking is, I notice when I do this manually myself from adehabitat output, that the mean of raw values (i.e. PDF) gives a very different result compared to the mean of the volume values (i.e. CDF). I'm sure there is a good mathematical explanation for this based on what these values represent, but I can't seem to wrap my head around it. 

Also quickly, what do PDF, CDF, and PMF stand for?

Best,
Martin

Christen Fleming

unread,
Feb 6, 2020, 9:08:26 AM2/6/20
to ctmm R user group
De nada Martin,

PDF: probability density function, which is >=0 and integrates to 1. Its values are continuous probability densities for the point location.
PMF: probability mass function, which is >=0 and sums to 1. Its values are discrete probability mass for the cell.
CDF: cumulative distribution function, which ranges from 0 to 1. Its values are HDR quantiles here in 2D.

It only makes sense to average the PDF/PMF. If you average CDFs, then you likely will not end up with a mathematically valid CDF. When you average PDF/PMF, then it has the meaning of a mixture distribution, where the weights are the proportion of time spent in each constituent distribution.

Best,
Chris

martin...@gmail.com

unread,
Feb 6, 2020, 10:43:00 AM2/6/20
to ctmm R user group
Ah great, thanks. That clears things up a bit. 

So then here's my next question. If you take the arithmetic mean of a set of individual UDs derived from IID models, the resultant population range will differ from a range derived directly from the pooled data (i.e. individuals ignored). These ranges can be made equivalent by instead calculating a weighted.mean(), using the number of points/fixes per individual as weights. 

Have you thought about ways in which to weight the averaging of akde-UDs? For example, using effective sample size (i.e. range crossings) for UDs derived from home ranging-models (i.e. OUF). Or even whether this is a worthwhile exercise in the first place?

FYI these are all questions I am asking myself in an effort to make sure the functions in my package work with ctmm home range output.

Cheers,
Martin

Christen Fleming

unread,
Feb 6, 2020, 1:56:40 PM2/6/20
to ctmm R user group
Hi Martin,

This is a problem in our current bioinformatics grant as a deliverable. You can think of the individual distributions as intermediates in a hierarchical model on the population. In the IID case, the optimal weights depend on both how much the number of fixes differ, but also how much the individual and population distributions differ. I've worked out the basic formulas for this in the more general AKDE case and will be coding it up in the next year.

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