move.forud: For Loop creating Utilization Distribution Contours for dbbmm...

Description Usage Arguments Details Value Author(s) References

Description

move.forud function that creates step utilization distribution contours based on the brownian .bridge.dynfrom package move and exports the created contour lines as a SpatialPolygonsDataFrame to a #'set of shapefiles for further whatever in ArcMap (or GIS program of choice).

Usage

1
move.forud(x, range.subset, ts, ras, le, lev, crs, path, name, ID)

Arguments

x,

dbbmm object created using brownian.bridge.dyn function call from move

range.subset,

range of model step segments that the user wants to create the UD contours for. Has to be greater than the margin based on the dbbmm object as estimates of variance for the first few steps are not estimable depending on how big of a margin is specified. Easiest way to define #' this range is to use the row number from the input file.

ts,

time step for integration of brownian.bridge.dyn() object

ras,

raster background size for brownian.bridge.dyn() object

le,

location error value for location.error= used in a typical dbbmm object

lev,

level of the UD contour as a vector, c(50, 95) that the user is interested in. Will work with #' multiple values (e.g., c(50, 95)) and will label those values in the resultant shapefile. Note that you don't have to put these values in as percentages (e.g., 0.50 for #' 50 percent).

crs,

coordinate reference system for identifying where the polygons are located. Uses standard CRS structure within quotes: CRS("+proj=longlat +datum=NAD83")

path,

file path (e.g., "C:/") using standard R path nomenclature specifying the location that the #'output shapefiles are to be written. Note that the call to writeOGR does not accept the path to use the final '/' in the path nomenclature (e.g. "C:/TestLocation is fine as path is being pasted into the dsn= portion of writeOGR or if you assign path= to a non-existant folder, it will create a folder of that name for you and store the output there..

name,

file name, in quotation's, specifying the output files name which will be written to the #'path designated above. This does not require a file extension (e.g., 'shp').

ID,

Unique identifier for each individual that is added to each created shapefile for linking to other #'data structures

Details

This function is a different approach than move.contour (which will be deprecated in 2016) that creates the same output (shapefiles of utilization distribution polygons) based on the dbbmm object. The primary difference between move.contour and move.forud is that move.forud uses a for loop to loop through the range of line segments for which it creates the UD's and then exporting the output as shapefiles one at time to the user-defined path. The time it takes to do each method seems to be the same as the slowness of the process is due to the calculations being done by brownian.bridge.dyn() of the UD over the raster extent. move.forud does not use all the memory in the system #'as did move.contour which saved the objects for one batch export of the shapefiles. move.forud #'is not particularly any more efficient than move.contour, but if you have a large raster extent and #'many individual time step utilization distributions that are being estimated, move.forud does not stack all the raster files in memory, causing issues.

I thought that vectorisation would speed this up, but the vast majority of the time is spend in the call to #'brownian.bridge.dyn() and not the rest of the for loop. So, I am working on some ways to reduce the #'background raster on which the contour estimates are created as there are alot of them that are way outside #'the range of useful at the individual time-step level, but when you look at the entire period which brow#'nian.bridge.dyn does, are actually useful. Think of it as pulling one hour worth of movements out of a year #'worth of GPS locations, it is likely that the 50m in that hour is a small segment of the overall range and #'hence background raster size.

As an aside, I do know that it is better to access values in slots using slot(object, 'name') versus the '@' #'sign, but, the routine I used to pull the requisite values from the DDBMvar object would not work as the data #'necessary does not have slot values assigned to it at this time.

Value

Output is a set of shapefiles, written to the specified path

Author(s)

Bret A. Collier <bret@lsu.edu>

References

Kranstauber, D., R. Kays, S. D. Lapoint, M. Wikelski, and K. Safi. 2012. A dynamic Brownian #bridge movement model to estimate utlization distributions for heterogenous animal movement. Journal of Animal Ecology 81: 738-746. DOI: 10 .1111/j.1365-2656.2012.01955.x.

Byrne, M. E., J. C. McCoy, J. Hinton, M. J. Chamberlain, and B. A. Collier. 2014. Using dynamic #'brownian bridge movement modeling to measure temporal patterns of habitat selection. Journal of Animal Ecology, 83: 1234-1243. DOI: 10.1111/1365-2656.12205


bacollier/moveud documentation built on May 11, 2019, 5:24 p.m.