[R-sig-Geo] kernelUD {adehabitatHR} - Bug in the function or human error?
Clement Calenge
clement.calenge at oncfs.gouv.fr
Fri Sep 20 10:08:38 CEST 2013
Dear Ivan,
On 09/19/2013 03:57 PM, Pan wrote:
> Dear all,
>
> does anybody knows whether the functions kernelUD or kernel.area
> {adehabitatHR} have some kind of bug in the calculation of the kde100?
>
> I run the following script:
>
> ### Calculate KDE95 by animal and Export Polygons to shapefile
>
> library(adehabitatHR)
>
> all.xy.proj<-all.locs.proj[,c("X.CRP","Y.CRP")]
> ind.id<-as.data.frame(all.locs.proj[,"individual.local.identifier"])
> all.xy.df<-SpatialPointsDataFrame(all.xy.proj,data=ind.id,proj4string=CRS(CRP.PROJ.4))
>
> all.kde.proj<-kernelUD(all.xy.df,h="href",grid=40,same4all=F,kern="bivnorm",extent=0.5)
> all.kde.pol<-getverticeshr(all.kde.proj,percent=95,unin="m",unout="km2")
> writeOGR(obj=all.kde.pol,dsn=paste(outputdir,"KDE95",sep=""),layer="all_kde95",driver="ESRI
> Shapefile")
>
> # Calculate Individual KDE Areas
>
> all.kde.areas<-kernel.area(all.kde.proj,percent=seq(50,100,by=5),unin="m",unout="km2")
> write.table(all.kde.areas, paste(outputdir, "all_kdelist.txt", sep=""),
> sep="\t")
>
> The result is 95% fine. The values are plausible till the kde95 then
> they increase dramatically up to factor 11.3 (e.g. kde95=350 sqKm,
> kde100=3968 sqKm).
> First I thought to outliers (e.g. sporadic exploration out of the
> territory, etc.) that might increase the kde100 value so I checked the
> mcp100. This latter is much smaller than the kde100 (mcp100=527 sqKm).
> These values are extreme but the average increase between kde95 and
> kde100 across my dataset is anyway factor 7.6!
>
> Does anybody have an explanation of this fact?
It's not a bug, it's a feature!
The kernel approach relies on the estimation of the utilization
distribution (UD), i.e. the function giving the probability density of
presence of an animal at a given place. The home-range, estimated at a
given level is derived from the UD, and corresponds to the smallest area
on which the probability of presence of the animal is equal to this
level. In other words, to the isopleth such that the volume under the UD
and within the limits of the isopleth is equal to this level. Thus, the
95\% home-range corresponds to the smallest area on which the
probability of presence of the animal is equal to 0.95. Therefore, the
100\% home range, derived from the UD, corresponds to the whole plane,
so that its area is, in theory, infinity. In practice, it is not because
the UD is estimated over a restricted grid.
HTH,
Clément Calenge
--
Clément CALENGE
Cellule d'appui à l'analyse de données
Direction des Etudes et de la Recherche
Office national de la chasse et de la faune sauvage
Saint Benoist - 78610 Auffargis
tel. (33) 01.30.46.54.14
More information about the R-sig-Geo
mailing list