[AniMov] Using R: AdehabiatHR: passing a different numeric value for the smoothing parameter to different individuals

Johannes Signer j.m.signer at gmail.com
Thu Mar 21 08:55:46 CET 2013


You could calculate a home range for each animal individually.

# Data prep
library(adehabitatHR)
data(puechabonsp)
loc <- puechabonsp$relocs

# Split the the data
loc <- split(loc, loc$Name)

# Calculate home ranges
h <- c(10, 20, 30, 40) # vector with your h values

uds <- lapply(seq_along(loc), function(x) kernelUD(loc[[x]], h[x]))


# You will end up with a list of UDs (class estUD) one for each animal,
# but not a multiple estUDm, however as far as I can tell estUDm is also
only
# a list of estUD, so you could do (but probably shouldn't)

class(uds) <- "estUDm"

# Then generic functions such as image will work
image(uds)

Hope this helps
Johannes


On Thu, Mar 21, 2013 at 6:11 AM, Iris Dröscher <iris.droescher at gmail.com>wrote:

> Hello,
>
>
>
>
>
> I plan to use the root-n bandwidth estimate for my Kernel homerange and
> Kernel overlap calculations and this bandwidth estimate varies between
> individuals.
>
>
>
> How can I pass different numeric values for the smoothing parameters in
> AdehabitatHR to different individuals?
>
>
>
>
>
> A.)
>
>
>
> I created a SpatialPointsDataframe (LiMa):
>
>
>
>
>
>   coordinates      id
>
> 1   (237.5, 186.5)  Lizzy
>
> 2     (233.5, 188)  Lizzy
>
> 3     (230.5, 192)  Lizzy
>
> etc.
>
> 127   (207, 190.5) Malcom
>
> 128   (207, 190.5) Malcom
>
> 129     (214, 176) Malcom
>
> etc.
>
>
>
>
>
>
>
> How could I set a different value for h for each individual (e.g. h=8.2
> for Lizzy, h=9.1 for Malcom)?
>
>
>
>
>
> I tried the following, which unfortunately does not work:
>
>
>
> Kernel  <- kernelUD(LiMa[,1], h=c(8.2, h=9.1))
>
>
>
> kerneloverlap(LiMa[,1], method = "UDOI", percent = 95, h=c(8.2, h=9.1))
>
>
>
>
>
> B.)
>
>
>
> Alternatively, I created a SpatialPointsDataframe (LiMa) with an
> additional column for the smoothing parameter:
>
>
>
>   coordinates      id   h
>
> 1   (237.5, 186.5)  Lizzy 8.2
>
> 2     (233.5, 188)  Lizzy 8.2
>
> 3     (230.5, 192)  Lizzy 8.2
>
> etc
>
> 127   (207, 190.5) Malcom 9.1
>
> 128   (207, 190.5) Malcom 9.1
>
> 129     (214, 176) Malcom 9.1
>
> etc
>
>
>
> I tried the following, which unfortunately does not work either:
>
>
>
> Kernel<-kernelUD(LiMa[,1], h=LiMa[,2])
>
> kerneloverlap(LiMa[,1], method = "UDOI", percent = 95, h=LiMa[,2])
>
>
>
>
>
> I would be very grateful if somebody could help me out with that problem.
>
> Best regards,
>
> Iris
>
> _______________________________________________
> AniMov mailing list
> AniMov at faunalia.it
> http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov
>
>


-- 

## ## Contact:
## Johannes Signer, MSc
## PhD-Candidate -- Wildlife Management
## Dept. of Forest Zoology & Forest Conservation
## University of Goettingen
## Buesgenweg 3 (room 85)
## 37077 Goettingen, Germany
## e: jmsigner at gmail.com
## p: +49 (0)551 39 3583
## m: +49 (0)176 61 962856
## skype: j.m.signer
## ##
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.faunalia.it/pipermail/animov/attachments/20130321/74269056/attachment-0001.html>


More information about the AniMov mailing list