[R-sig-Geo] adehabitatHR: combining estUD for kerneloverlaphr
Clement Calenge
clement.calenge at oncfs.gouv.fr
Sun Aug 5 20:36:52 CEST 2012
On 08/03/2012 06:50 PM, Anthony Fischbach wrote:
> I wish to examine indices of home-range overlap of utitilzation distributions
> generated by differing home-range estimating methods.
>
> The *adehabitatHR* function *kerneloverlaphr* acts on an object of class
> estUDm containing several home-ranges for which the overlap is to be
> calculated.
>
> Is there handy way to 'stack' several home-ranges calculated by various
> methods into a single estUDm object such that the resulting estUDm object
> may be handled by kerneloverlaphr?
>
> Example code:
> require(adehabitatHR)
>
> data(buffalo) ## Example dataset used by Benhamou (2011)
>
> ## Example estUDm objects gererated as per the example provided in
> adehabitatHR (v 0.4.2).
> id<- BRB(buffalo$traj, D = 440/60, Tmax = 3*3600, Lmin = 50, type = "ID",
> hmin=100, radius = 300, maxt = 2*3600, activity="act",
> filtershort=FALSE,
> grid = 200, extent=0.1)
>
> rd<- BRB(buffalo$traj, D = 440/60, Tmax = 3*3600, Lmin = 50, type = "RD",
> hmin=100, radius = 300, maxt = 2*3600, activity="act",
> filtershort=FALSE,
> grid = 200, extent=0.1)
>
> ud<- BRB(buffalo$traj, D = 440/60, Tmax = 3*3600, Lmin = 50,
> hmin=100, radius = 300, maxt = 2*3600, activity="act",
> filtershort=FALSE,
> grid = 200, extent=0.1)
>
> x<-* 'Special stacking function'*(id, rd, ud) ## Here is what I am wanting.
> Is it possible?
> kerneloverlaphr(x, method='VI')
If you want to use kerneloverlaphr, you need to provide the same grid
for all estimations.
Then, you can create a "fake" estUDm object. For example:
library(adehabitatHR)
data(buffalo) ## Example dataset used by Benhamou (2011)
id <- BRB(buffalo$traj, D = 440/60, Tmax = 3*3600, Lmin = 50, type = "ID",
hmin=100, radius = 300, maxt = 2*3600, activity="act",
filtershort=FALSE,
grid = 200, extent=0.1)
## use the same grid for other estimations (grid=id):
rd <- BRB(buffalo$traj, D = 440/60, Tmax = 3*3600, Lmin = 50, type = "RD",
hmin=100, radius = 300, maxt = 2*3600, activity="act",
filtershort=FALSE,
grid = id, extent=0.1)
ud <- BRB(buffalo$traj, D = 440/60, Tmax = 3*3600, Lmin = 50,
hmin=100, radius = 300, maxt = 2*3600, activity="act",
filtershort=FALSE,
grid = id, extent=0.1)
## Convert to fake estUDm
tot <- list(id=id, rd=rd, ud=ud)
kerneloverlaphr(tot)
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