[AniMov] Fwd: kernel homerange

Clément Calenge calenge at biomserv.univ-lyon1.fr
Wed Jul 19 14:15:16 CEST 2006

Hi Leonardo and Carlotta,

The kernel method estimates the UD. The UD is a mathematical model which 
describes the space use by an animal with the help of a bivariate 
*continuous* probability density function. Thus, under this model, the 
probability that the animal has been present at a given *exact* location 
X,Y is equal to zero. The probability is different from zero over a 
small area around the point X,Y. The probability can be computed for an 
area, not for a point. Therefore, the probability to find two 
relocations at exactly the same place under this model is equal to zero. 
This hypothesis can be overlooked for the kernel estimation. However, 
the LSCV estimation of the smoothing parameter relies more heavily on 
this hypothesis of continuity than does the kernel estimation itself. 
Now, consider your data.

a <- read.table("fix_fagiani.txt", h=T, sep=",")
lt <- split(a[,c("x","y")], a[,1])

## consider for example the 4th animal: 101 relocations
uu <- lt[[4]]

For example, for the 4th animal, you want to estimate the home range 
using a sample of relocations. For this you need a mathematical model.
You decide that the UD is a good model, but to estimate the kernel home 
range, you need a value for the smoothing parameter.
The ecological literature indicates that the LSCV is an optimal estimator:

 > kernelUD(uu, h="LSCV")
WARNING!! No convergence in cross-validation for the following animals:
[1] 1
Consider a new fit of UD using the ad hoc method for h.

But the LSCV does not work. As indicated previously, this maybe caused 
by the fact that
several relocations are found at the same place... and indeed:

## count the number of relocations found at exactly the same point:
ii=table(paste(uu[,1], uu[,2]))

One may find up to 5 relocations at the same point! Under such a model, 
the probability of finding 5 relocations at exactly the same place is 
equal to zero: the data contradict the model. So that the underlying 
model of a continuous pdf does not hold. The data are therefore 
inadequate for the LSCV, or, more exactly, the LSCV is inadequate for 
these data. As noted in a previous mail to the list, the main question 
is now: why is this model inadequate? this may be caused by several 
factors, and it is difficult to determine which solution to adopt... 
This is your decision.

For example the fact that several relocations are found at the same 
place may be the result of rounding errors. For example, on the field, 
when relocations are taken, it may happen that the biologists round the 
relocations coordinates to exact values (e.g. x = 300652.32654 rounded 
to x = 300650), or round the bearings (direction of the signal relative 
to the north, i.e. 30.65645843° rounded to 31°), which may also lead to 
discretized relocations. In this case, the mathematical model is not 
adequate, but this is due to the data collection. One may therefore 
correct the data by adding a small noise to the relocations found 
exactly at the same place, a noise corresponding to the imprecision in 
the data. Consider the following function:

movesamepoint <- function(xy, amount)
fa <- paste(xy[,1], xy[,2])
ta <- table(fa)
ta <- ta[ta>1]
mov <- fa%in%names(ta)
xy[mov,1] <- jitter(xy[mov,1], amount=amount)
xy[mov,2] <- jitter(xy[mov,2], amount=amount)

Now let the error polygon on the relocations be about of 1 hectare (for 
illustration purposes, this may actually be another value). That is, the 
actual relocation is situated within a circle of sqrt(10000/pi) = 56, 
say 50 meters around the estimated relocation. Therefore, the amount to 
specifiy in the function above is 50 (the function jitter() will 
therefore add a noise comprised between -50 m and 50 m).

image(kernelUD(movesamepoint(uu,50), h="LSCV"))

And the estimation is OK. Of course, in this case, it works, but if your 
error is 100 m² (i.e. amount=5 meters)

 > kernelUD(movesamepoint(uu,5), h="LSCV")
WARNING!! No convergence in cross-validation for the following animals:
[1] 1
Consider a new fit of UD using the ad hoc method for h.
Warning message:
The algorithm did not converge
within the specified range of hlim: try to increase it in: 
kernelUD(movesamepoint(uu, 5), h = "LSCV")

The problem occurs again and the question remains. In this case, the 
relocations are so close that the procedure fails. But now, it is maybe 
caused by biological reasons: the nature does not follow mathematical 
hypotheses! The use of a given method implies a decision of the analyst: 
is a given mathematical model a good one or not, given a problematic and 
a dataset ? The pheasant may stay at the same relocation because the 
environment at this place is favourable, or because it is the location 
of its nest, or... etc.
The underlying model is inadequate, and the method should be avoided: 
the LSCV is not an adequate estimator for the smoothing parameter...

>I don't know if there is some problems with my data. 
The problem with your data may be that there is a rounding of the 
bearings before the relocations are computed. But this problem can be 
circumvented as indicated above.
If this imprecision is not the source of the failure of the procedure, 
then, there is no problem with your data.
But there is a problem with the use of the method with your data: it is 
inadequate. What to do? I don't know, it depends on your objectives, on 
what you consider to be a home range, on what you do with the home range 
after its estimation, on whether you are interested in core areas, etc. 
For example, you may try to use more classical estimation "href", or to 
decide on a value for the smoothing parameter (e.g. on a visual 
exploration, h = 30 meters seem to be a good choice... of course this 
depends on your objectives), or to decide that the kernel estimator is 
not a good one and use MCP, etc. There is no automatic method...
Hope this helps,
Best wishes


More information about the AniMov mailing list