[R-sig-Geo] differences in home range estimation between kernelUD (adehabitatHR) and kernel2d (splancs)

David Villegas Ríos chirleu at gmail.com
Thu Feb 12 09:51:21 CET 2015


Hi list,
I'm estimating home range sizes (95% kernel) for 40 fish individuals.
I replicated the estimations with two different functions in two different
R-libraries: kernelUD in adehabitatHR and kernel2d in splancs.
I'm getting quite different results from both methods, even if I use the
same smoothing factor and the same grid.

The code to estimate the kernels is (I'm not including the code to get the
HR area since I just want to know if the code below should provide the same
results):

######################################### with adehabitatHR
# Define grid
x <- seq(495000,499000,by=10)  # where resolution is the grid size you
desire
y <- seq(6494000,6498500,by=10)
xy <- expand.grid(x=x,y=y)
coordinates(xy) <- ~x+y
proj4string(xy) <- CRS("+proj=utm +zone=32")
gridded(xy) <- TRUE
class(xy)

h=50        # set bandwidth:
g=xy        # set grid, xy is the study area
e=0.5       # set extent

# Kernel
 kud1=kernelUD(detections[,1],h=h, grid=g, extent=e,kern=c("bivnorm"))

######################################### with splancs
# Define polygon
polyx<-c(495000,499000,499000,495000,495000)
polyy<-c(6494000,6494000,6498500,6498500,6494000)
plot(polyx,polyy)
points(detections)
polygon<-data.frame(x=polyx,y=polyy)
polygon<-as.matrix(polygon)

# Kernel
kud2<-kernel2d(coordinates(detections),polygon,h0=50,nx=1000,ny=1000)

## END ##

This is the xyplot of the estimates from both methods. See that
adehabitatHR overestimates quite a lot (HR are much more rounded than with
splancs) and that there are three points which do not fall in the straight
line...this intrigues me a lot...

[image: Imágenes integradas 1]

I know the resolution of both grids is not exactly the same. Correct me if
needed, but in the case of adehabitat the resolution is 10 meters, and in
the case of splancs is 4 meters on the Longitude and 4.5 meters on the
Latitude. But I feel that this is not causing the difference, since I have
tested many different resolutions in adehabitatHR and got very very similar
results in all cases.
So why am I getting so different results? Shouldn't I expect approximately
the same results? Is there any difference in the way that both functions
estimate the kernel? I could provide some data if it is needed, but I guess
my question is quite general about the differences between both functions.

Thanks in advance,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20150212/542210a6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 16205 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20150212/542210a6/attachment.png>


More information about the R-sig-Geo mailing list