# [AniMov] Kernel UD questions

Clément Calenge calenge at biomserv.univ-lyon1.fr
Fri Jul 13 09:36:22 CEST 2007

```Hi Leslie,

The sum of the UD is not equal to 1: it is the *volume* under the UD
which is equal to 1. This means that each value of the UD (height of the
UD) should be multiplied by the area of the corresponding pixel (in your
example, each pixel covers 1/1.6e-05 = 62500 m2, which means that your
pixel have a side measuring 250m, you can verify it by typing attr(e1,
"cellsize")).
For example, using the dataset puechabon (just copy and paste within R):

data(puechabon)
loc <- puechabon\$locs[, c("X", "Y")]
id <- puechabon\$locs[, "Name"]
elev <- getkasc(puechabon\$kasc, "Elevation")
elev

ud <- kernelUD(loc, id, grid = elev)
unlist(lapply(ud, function(x) sum(x\$UD) * (attr(x\$UD, "cellsize")^2)))

It sums to 1.
Hope this helps,

Clément Calenge

Leslie Jones wrote:
>
> Hi –
>
> I have been working with Adehabitat kernelUD function to create
>
> probability surfaces for several packs of coyotes.
>
> I was performing a check on the output data and discovered that
>
> the cells do not add to 1.
>
> I performed the check on 4 different packs. In each case the
>
> probability surface sums to 1.6 e-05.
>
> My code looks something like this:
>
> (file1 <-
>
> e1 <- import.asc(file1)
>
>
>
> ##create matrix of xy data from columns named x and y for coyotes
>
> xy<-coyote1[,1:2]
>
> id<-coyote1[,3]
>
> ##estimation of ud for one animal.
>
> kud<- kernelUD(xy, id, grid=e1, h=250,same4all=TRUE, kern="bivnorm")
>
> ## gets the estimate on the grid
>
> gr <- lapply(kud, function(x) x\$UD)
>
> Could anyone shed some light on why this might be happening??
>
> Thanks very much,
>
> Leslie Jones
>

--
Clément CALENGE
LBBE - UMR CNRS 5558 - Université Claude Bernard Lyon 1 - FRANCE
tel. (+33) 04.72.43.27.57
fax. (+33) 04.72.43.13.88

```