mkde3Dgrid: Movement-based kernel density estimate (MKDE) in 3D using...

View source: R/mkdeFunctions.R

mkde3DgridR Documentation

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

Description

Provides a function for 3-dimensional MKDEs.

Usage

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

Arguments

mkde.obj

A 3D 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 3D. 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 voxel.

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(condor)

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

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

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

mkde.obj <- initializeMKDE3D(xmin, cell.sz, nx, ymin, cell.sz, ny, 0.0, cell.sz, nz)
res <- mkde3Dgrid(mkde.obj, mv.dat, 5.0, 1e-20)

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