Dear Rafael,

In more detail, I've estimated a 3 month utilization distribution for
an individual, and I would like to know where that individual's
locations on a given week lie in relation to the estimated kernel and
obtain a probability for each location. My guess is that the function
kernelUD is already estimating these probabilities for each cell in a
grid (or something along those lines),

Yes, kernelUD returns a grid giving the estimated probability density that an animal is located at a particular place.


but I have no idea how to
access that information. I've tried: as.numeric(kernel$individual$UD),
but I'm not entirely sure if I'm on the right track.

This example might help (just copy and paste):

## load the data
library(adehabitat)
data(puechabon)
loc <- puechabon$locs[, c("X", "Y")]
id <- puechabon$locs[, "Name"]

## estimate the ud
ud <- kernelUD(loc, id)

## if you type:
ud
## it gives you:
#********** Utilization distribution of Animals ************
#
#Type: probability density
#
#UD have been estimated using the kernel method for the following #animals:
#[1] Brock Calou Chou  Jean
#
#The smoothing parameter was estimated by the reference method (ad hoc)
#
#Each animal is a component of the list, and for each animal,
#the following elements are available:
#$UD       The utilization distribution (object of class "asc")
#$locs     The relocations of the animal
#$h        The value of the smoothing parameter
#
# Therefore, to get the map of the UD for the first animal
# type:
an1 <- ud[[1]]$UD
an1
# an1 is of class asc (see ?import.asc for a description of the class)
image(an1)
#
# and to join find the values of the UD for each point
# of animal 1, use join.asc
ll <- join.asc(loc[id==names(ud)[1],], an1)
head(ll)
#
# To automate this, use a loop "for" or the function lapply:
lil <- lapply(1:length(ud), function(i) {
 an <- ud[[i]]$UD
 join.asc(loc[id==names(ud)[i],], an)
})


Please note however that the package adehabitat will soon be replaced by the packages adehabitatMA, adehabitatLT, adehabitatHR, adehabitatHS. The functions available in these packages are the same as those in adehabitat, but the classes returned by these functions are those available in sp (SpatialPixelsDataFrame, etc.).
See: http://www.mail-archive.com/[email protected]/msg125578.html
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
_______________________________________________
AniMov mailing list
[email protected]
http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov

Reply via email to