[AniMov] problem with getverticeshr at >85%

Damiano G. Preatoni prea at uninsubria.it
Wed Jul 28 17:31:48 CEST 2010

In un messaggio del Wednesday 28 July 2010, Corrie Curtice ha scritto:
> On Wed, Jul 28, 2010 at 2:35 AM, Anne Ghisla <a.ghisla at gmail.com> wrote:
> > On Tue, 2010-07-27 at 15:27 -0400, Corrie Curtice wrote:
> >> Hello,
> >> 
> >> I am trying to export the home range for a single individual animal.
> >> I'm getting the error  "Error in re[[i]] : subscript out of bounds" --
> >> I looked on the archive and found my own posting of this question for
> >> the 100% isopleth. :)  So now I'm wondering, why does the error occur
> >> at lower isopleth levels? Ideally I would like the 95% KHRE to show
> >> the "home range" of each animal, and this works with all other
> >> individuals.  The answer to my last posting noted that the isopleth
> >> went beyond the grid limits.   I'm not passing in an underlying grid.
> >> Here's my call:
> >> 
> >>     ud <- kernelUD(xy, grid=100, h="href")
> >>     kvtmp <- getverticeshr(ud, lev = 95)
> >> 
> >> Levels up to 85 work fine.  Is there anything I can do to fix this, if
> >> not what is the proper way to report the result for this animal? If
> >> you need more code or output I can send.
> > 
> > Hi Corrie,
> > 
> > it sounds like the issue reported here:
> > 
> > https://trac.faunalia.it/animove/ticket/13
> > 
> > does your dataset show anisotropy? The one attached to the ticket is a
> > narrow cloud of points along a horizontal line. The default grid created
> > by kernelUD is likely not able to encompass the whole UD. If the case, I
> > would try creating a wider grid and providing it to kernelUD.
> > 
> > hope this helps!
> Yes, that's exactly it.  I tried increasing the value passed into the
> grid parameter -- is this right?  Is there some way to determine what
> the correct value would be?

There is no "correct" value for the grid parameter.
It it a known "feature" of adehabitat.

That is, passing "grid=<some integer value>" means that kernel calculations 
(see e.g. Worton classical text) start with superimposing your point locations 
a mesh with <integer value> x <integer value> _cells_. Worton's default is 

Problem is that is more meaningful having the possibility to supply the _cell 
size_  insteda of the _number of cells_.

This means that if your points cloud covers a _wide_ extent, say, half a 
state, you will have in your case a 100x100 cells mesh, and a single cell side 
will be some tenths of kilometers!

To overcome this problem, one should use "grid=<a kasc object>" (look into 
kernelUD source...).

I normally do like this:
- using my favorite GIS package, I create a raster with the cell size I want, 
making it so that covers my study area. This way I'll have for instance a 
raster with 100 m cells, with a size of such and such rows and columns (I say 
'such and such' since we're not interested in how many squares we have, but in 
how long is a square side!).
- I export that raster in ASCII GRID format.
- back into R I use read.asc function and create a kasc object that then I 
will use as my "reference grid" in home range calculations, like this:

  my.reference.grid <- read.asc('refgrid.asc')
  ud <- kernelUD(xy, grid=my.reference.grid, h="href")

Hope this helps!

Never drink from your finger bowl -- it contains only water.
Damiano G. Preatoni, PhD

Unità di Analisi e Gestione delle Risorse Ambientali
Dipartimento Ambiente-Salute-Sicurezza
Università degli Studi dell'Insubria
Via J.H. Dunant, 3 - 21100 Varese (ITALY)

tel +39 0332421538 fax +39 0332421446
ICQ: 78690321 jabber: prea at jabber.org skype: prea.net
Please consider the environment before printing this email
Please do not send attachments in proprietary formats
Use the UNI CEI Standard ISO/IEC 26300:2006
O< stop html mail - http://www.asciiribbon.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.faunalia.it/pipermail/animov/attachments/20100728/a6f2a632/attachment.pgp>

More information about the AniMov mailing list