mkde3Dinteraction: Probability of 3D spatial-temporal interaction.

Description Usage Arguments Details Value Author(s) Examples

View source: R/mkdeFunctions.R

Description

Metric of 3D spatial-temporal interaction.

Usage

1
mkde3Dinteraction(mkde.obj, move.dat0, move.dat1, t.step, d.thresh)	

Arguments

mkde.obj

An MKDE object created with initialize3DMKDE

move.dat0

A move data object for the first individual created with initializeMovementData

move.dat1

A move data object for the second individual created with initializeMovementData

t.step

A time step used for numerical integration over the movement trajectory

d.thresh

The value of the kernel below which its contibrution to the overal density is considered negligible

Details

This function assumes that the two individual animals were observed at the same times. The voxel values returned in the mkde.obj can be summed to obtain a global measure of spatio-temporal interaction.

Value

Returns a list with the following elements:

mkde.obj

An updated MKDE object containing the voxel-level Bhattacharyya coefficients

move.dat0

A move data object for the first individuals with updated variance parameters

move.dat1

A move data object for the second individuals with updated variance parameters

Author(s)

Jeff A. Tracey, PhD
USGS Western Ecological Research Center, San Diego Field Station
[email protected]
James Sheppard, PhD
San Diego Zoo Institute for Conservation Research
[email protected]
Jun Zhu, PhD
University of Wisconsin-Madison
[email protected]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
library(raster)
data(condor)
condor <- condor[1:4,] # simply to make example run more quickly
mv.dat0 <- initializeMovementData(condor$time, condor$x, condor$y, 
z.obs=condor$z, sig2obs=25.0, sig2obs.z=81.0, t.max=65.0)
n <- nrow(condor)
v <- 20.0 # increase from 0 to increase difference between move trajectories
vz <- 5.0
mv.dat1 <- initializeMovementData(condor$time, condor$x+rnorm(n, 0, v), 
condor$y+rnorm(n, 0, v), z.obs=condor$z+rnorm(n, 0, vz), sig2obs=25.0, 
sig2obs.z=81.0, t.max=65.0)

data(condordem120)
# next two lines reduce extent of 2D space to speed execution of example
tmp <- extent(c(range(condor$x) + c(-100, 100), range(condor$y) + c(-100, 100)))
condordem120 <- crop(condordem120, tmp)
cell.sz <- mean(res(condordem120))
ext <- extent(condordem120)
nx <- ncol(condordem120)
ny <- nrow(condordem120)
nz <- ceiling(3000.0/cell.sz)
mkde.obj <- initializeMKDE3D(ext@xmin, cell.sz, nx, ext@ymin, cell.sz,
ny, 0.0, cell.sz, nz)

res <- mkde3Dinteraction(mkde.obj, mv.dat0, mv.dat1, 10.0, 1e-20)
mkde.obj <- res$mkde.obj
mv.dat0 <- res$move.dat0
mv.dat1 <- res$move.dat1

mkde documentation built on May 29, 2017, 8:26 p.m.