mkde2Dgrid: Movement-based kernel density estimate (MKDE) in 2D using...

View source: R/mkdeFunctions.R

mkde2DgridR Documentation

Movement-based kernel density estimate (MKDE) in 2D using Rcpp

Description

Provides a function for 2-dimensional MKDEs.

Usage

mkde2Dgrid(mkde.obj, move.dat, t.step, d.thresh)	

Arguments

mkde.obj

A 2D or 2.5D MKDE object

move.dat

A move data object

t.step

An integration time step

d.thresh

A kernel density threshold

Details

This is lower-level function that call the C++ function. for estimating the movement-based density in 2D. In practice, users should call initializeDensity.
The argument d.thresh is a univariate probability density beyond which the kernel contribution to the overall MKDE is assumed to be negligible. Usually this is set at a very small value and is used to prevent calculations from being performed in cells to which the kernel makes a negligible contribution.

Value

An array whose elements are the estimated utilization probabilities for each cell.

Author(s)

Jeff A. Tracey, PhD
USGS Western Ecological Research Center, San Diego Field Station
jatracey@usgs.gov
James Sheppard, PhD
San Diego Zoo Institute for Conservation Research
jsheppard@sandiegozoo.org
Robert Sinkovits, PhD
San Diego Supercomputer Center
sinkovit@sdsc.edu
Glenn Lockwood, PhD
San Diego Supercomputer Center
glock@sdsc.edu
Jun Zhu, PhD
University of Wisconsin-Madison
jzhu@stat.wisc.edu

Examples

library(raster)
data(panda)

# Find min/max coordinates and add buffer
xmax = max(panda$x) + 100
xmin = min(panda$x) - 100
ymax = max(panda$y) + 100
ymin = min(panda$y) - 100

# Calculate grid dimensions
xrange <- xmax - xmin
yrange <- ymax - ymin
cell.sz = 30
nx <- as.integer(xrange/cell.sz)
ny <- as.integer(yrange/cell.sz)

mv.dat <- initializeMovementData(panda$time, panda$x, panda$y, t.max=185.0, sig2obs=25.0)
if (all(is.na(mv.dat$sig2xy))) {
  mv.dat <- estVarMKDE(mv.dat)
}

mkde.obj <- initializeMKDE2D(xmin, cell.sz, nx, ymin, cell.sz, ny)
res <- mkde2Dgrid(mkde.obj, mv.dat, 10.0, 1e-20)

mkde documentation built on July 9, 2023, 6:41 p.m.