DI {wildlifeDI}R Documentation

Dynamic interaction index

Description

The function DI measures dynamic interaction between two moving objects. It calculates the local level di statistic for movement displacement, direction, and overall. DI can compute time- and/or distance-based weighting schemes following Long and Nelson (2013).

Usage

DI(traj, traj2, tc = 0, local = FALSE, rand = 0, alpha = 1)

Arguments

traj

an object of the class move2 which contains the time-stamped movement fixes of at least two individuals. For more information on objects of this type see help(mt_as_move2).

traj2

(optional) same as traj, but for the second group of individuals. See checkTO

tc

time threshold for determining simultaneous fixes – see function: GetSimultaneous.

local

logical value indicating whether a dataframe (local = TRUE) containing the DI index for each simultaneous fix should be returned (with a local permutation test), or (if local = FALSE - the default) the global index along with associated global permutation test.

rand

number of permutations to use in the local permutation test.

alpha

value for the \alpha parameter in the formula for di_d (default = 1).

Details

This function can be used for calculating the dynamic interaction (DI) statistic as described in Long and Nelson (2013). The DI statistic can be used to measure the local level of dynamic interaction between two moving objects. Specifically, it measures dynamic interaction in movement direction and displacement.

Value

If local=FALSE (the default) DI returns the numeric value of the DI index (along with DI_{theta} and DI_d), and the associated p-value from a permutation test (see IAB). If local=TRUE DI returns a large dataframe that contains the localized di values as a column (see Long and Nelson 2013). The columns for di, di.theta, and di.d represent dynamic interaction overall, in direction (azimuth), and in displacement, respectively for each segment. A localized p-value for a one sided test for positive interaction (and z-score) is computed based on rand permutations of the segments. The row.name columns can be used to match the simultaneous segments to the original trajectory (see IAB).

References

Long, J.A., Nelson, T.A. 2013. Measuring dynamic interaction in movement data. Transactions in GIS. 17(1): 62-77.

See Also

GetSimultaneous, Cr, IAB

Examples

## Not run: 
data(deer)
#tc = 7.5 minutes
DI(deer, tc = 7.5*60)
df <- DI(deer, tc = 7.5*60, local = TRUE)

## End(Not run)


[Package wildlifeDI version 1.0.0 Index]